字体样式
- font-size:字体大小
- font-family:字体类型
- font-weight:字体粗细
- font-style:字体风格
{ font-style:italic/oblique/normal;}
font:字体样式的综合设置
选择器{font:font-style font-weight font-size/line-height font-family;}
说明:使用font属性时,必须按上面语法格式中的顺序书写,不能更换顺序,各个属性以空格隔开。不需要设置的属性可以省略(取默认值),但必须保留font-size和font-family属性,否则font属性将不起作用。
外观
- 文本颜色:color
- 文本装饰:text-decoration
text-decoration:none/underline/overline/line-through line-through:添加删除线
- 行间距:line-height
- 水平对齐方式:text-align
{text-align:left/right/center;}
- 垂直对齐方式:vertical-align
{vertical-align:top/bottom/middle;}
- 首行缩进:text-indent
- 字间距:letter-spacing
- 词间距:word-spacing