跟字型相关的CSS设定
font-family指定使用的字体,可以设定多个,让浏览器依照排序使用
font-family: 微软正黑体,”Arial”;
指定字体大小,有多种单位可以使用:
small、large、pt、px、cm、%
font-size:16pt font-size:large
指定字型厚度,数值越大字型越粗
也可以直接使用”bold”指定之
font-weight:100;font-weight:bold;
指定字型样式,大多用来设定斜体
font-style:italic;
跟文字排列 (行距、排序) 有关的设定
letter-spacing指定字与字之间的间距
letter-spacing: 4pt;
设定行高
line-height:200% line-height:16px
ext-align
指定字型对齐方式
包含 left(向左)、center(置中)、right(向右)、justify(左右对齐)text-align:justify;
text-decoration
修饰文字
包含 underline(底线)、overline(上线)、line-through(删除线)、blink(让文字闪烁)、text-decoration:line-through;
text-indent
段落的第一行要留多少缩排text-ident:20px text-ident:12pt;
text-transform
大小写控制
包含 capitalize(第一个字母大写)、uppercase(全部字母大写)、lowercase(全部字母小写)text-transform:uppercase;
word-spacing
仅适用于英文单字,控制「英文单字」间的距离用法与 letter-spacing 有点类似,不同的是word-spacing 控制的是单字(或段落)而非单一字母letter-spacing 控制的则是单一字元间的距离。word-spacing:2px