龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > div+css/html >

css教程:CSS字体font属性的应用  

时间:2012-12-29 08:41来源:未知 作者:admin 点击:
分享到:
TheCSSfontpropertiesdefinethefontintext. CSS字体属性可定义文字所使用的字体。 设置文字的字体Setthefontofatext Thisexampledemonstrateshowtosetafontofatext. Examples实例: Source Code to Run [www.fun52.com] h3 {font-fa
The CSS font properties define the font in text.
CSS字体属性可定义文字所使用的字体。
设置文字的字体 Set the font of a text
This example demonstrates how to set a font of a text.
Examples 实例:
Source Code to Run [www.fun52.com]
h3 {font-family: times}
h5 {font-family: arial}
p {font-family: courier}
p.sansserif {font-family: sans-serif}
This is header 3
www.fun52.com
This is a paragraph
This is a paragraph
   [ 可先修改部分代码 再运行查看效果 ]
设置字体的大小 Set the size of the font
This example demonstrates how to set the size of a font.
Examples 实例:
Source Code to Run [www.fun52.com]
h1 {font-size: 150%}
h2 {font-size: 130%}
p {font-size: 100%}
This is header 1 www.fun52.com
This is header 2
This is a paragraph
   [ 可先修改部分代码 再运行查看效果 ]
设置字体的样式 Set the style of the font
This example demonstrates how to set the style of a font.
Examples 实例:
Source Code to Run [www.fun52.com]
h1 {font-style: italic}
h2 {font-style: normal}
p {font-style: oblique}
This is header 1
This is header 2 www.fun52.com
This is a paragraph
   [ 可先修改部分代码 再运行查看效果 ]
设置字体的形态 Set the variant of the font
This example demonstrates how to set the variant of a font.
Examples 实例:
Source Code to Run [www.fun52.com]
p.normal {font-variant: normal}
p.small {font-variant: small-caps}
This is a paragraph www.fun52.com
This is a paragraph
   [ 可先修改部分代码 再运行查看效果 ]
第 1 2 页
精彩图集

赞助商链接