color 字体颜色
font-size 字体大小
- px,直接设置字体大小
-
em 相对于当前元素的单位
-
rem 相对于根元素的单位(根元素单位:16px)
font-family 字体类别
font-weight 字重
- bold加粗
- normal正常
font-style 字体风格
- italic斜体
- normal正常
font 字重 字体风格 字体大小/行高 字体族
line-height 文字占有的实际高度
- 行高直接写数字,行高是字体的指定倍数
text-align 文字对齐方式
-
left
-
right
-
center
-
justify
text-indent文本首行缩进
letter-spacing文本字符间距
text-decoration
-
none 什么都没有
-
underline 下划线
-
line-through 删除线
-
overline 上划线
内部空白处理
- white-space:nowrap 不换行
-
overflow: hidden 超出部分隐藏
-
text-overflow: ellipsis 一行显示超出显示...