font
font = [[<font-style> || <font-variant-css2> || <font-stretch-css3>? <font-size> [ / <line-height>]? <font-family> ]? | caption | icon |menu | message-box | small-caption | status-bar
<font-style>
它的默认值是normal
font-style = normal | italic | oblique <angle>?
如果使用简写,那么它必须要有font-family不然是无效的
oblique后面的<angle>如果使用大概率无效
<font-family>
font-family = [<family-name> | <generic-family>]#
<family-name>
通用字体名称
<font-variant-css2>
font-variant-css2 = [normal | small-caps]
small-caps是小型大写字母的意思
涉及的属性名有font-synthesis-weight,font-synthesis-style,font-synthesis-small-caps,font-synthesis
<font-stretch-css3>
允许你使文字变宽或者变窄
font-stretch-css3 = [normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded ]
属性名是 font-stretch,下面的属性值很可能没有卵用
ultra-condensed:使文本窄的不能再窄,大概率无效果
extra-condensed:紧缩程度第二大的字体
condensed:紧缩程度第三大的字体
semi-condensed:紧缩程度最小的字体
normal:默认值
semi-expanded:使文本稍微变窄
expanded:变得更宽
extra-expanded:变得最宽
<font-size>
font-size = <absolute-size> | <relative-size> | <length-percentage> | math
默认值为absolute-size的medium
<absolute-size> = [xx-small | x-small | small | medium | large | x-large | xx-large]
这些值的大小由用户控制
<relative-size> = [larger | smaller]
<font-weight>
font-weight = normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
默认值:normal
caption
表格头
icon
图标字体,大小16px,会使英文紧凑一点,font-weight大一点
menu
使用系统字体,可以给用户一种熟悉的感觉
message-box
dialog中使用的字体
small-caption
小标题
status-bar
windows电脑的状态栏