字体属性综合写法(font)
font是字体属性中可以综合定义以上五种属性的快捷方法,它可以用一行来定义font属性,书写顺序分别是:font-style font-variant font-weight font-size font-family。例子:
.ziti {font:italic normal bold 18px arial;}
如果哪项属性是默认值,可以把他省略不写,系统会自动解析其为默认值。
font的取值有点复杂,取值主要分为两部分,现在举几个[ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ]取值的例子.
p { font:italic small-caps bold 12px/1.2em Arial; }