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属性万紫千红
青出于蓝
绿光闪烁