css代碼
1.CSS文本樣式:
p.serif {
font-family: "Times New Roman", Times, serif;
}
p.sansserif {
font-family: Helvetica, Arial, sans-serif;
}
p.monospace {
font-family: "Courier New", Courier, monospace;
}
p.cursive {
font-family: Florence, cursive;
}
p.fantasy {
font-family: Blippo, fantasy;
}
HTML代碼:
這是一個使用Times New Roman字體的段落。
這是一個使用Helvetica字體的段落。
這是一個使用Courier New字體的段落。
這是一個使用Florence字體的段落。
這是一個使用Blippo字體的段落。
2.字體大小:關鍵字 CSS代碼: p.small { font-size: small; }p.medium {
font-size: medium;
}
p.large {
font-size: large;
}
p.xlarge {
font-size: x-large;
}
HTML代碼:
Paragraph text set to be small
Paragraph text set to be medium
Paragraph text set to be large
Paragraph text set to be very large
3.font-style CSS: p.normal { font-style: normal; } p.italic { font-style: italic; } p.oblique { font-style: oblique; } HTML:我沒有效果。
我是斜體。
我是傾斜,樓上的孿生兄弟
我是隔壁鄰居HTML叔叔的娃,但是為什么跟樓上兩兄弟這么像,究竟發生了什么 4.color屬性萬紫千紅
青出于藍
綠光閃爍

浙公網安備 33010602011771號