文本
1、文字粗细
font-weight: bold; /*加粗*/
font-weight: normal; /*正常*/
2、文字style
font-style: italic; /*斜体*/
font-style: normal; /*正常*/
3、文字大小
font-size: 40px; /*文字大小*/
4、文字字体
font-family: '微软雅黑'; /*文字类型*/
5、文字行高
line-height: 20px; /*行高*/
6、复合样式:续按照顺序书写,/后是行高
font: bold italic 40px/60px '微软雅黑';
7、文字颜色
color: red; /*文字颜色*/
8、文本对齐方式
text-align: center; /*文本对齐方式*/
text-align: right;
text-align: left;
9、首行缩进
text-indent: 2px; /*首行缩进*/
text-indent: 2em; /*一个字体大小*/
10、下划线
text-decoration: underline; /*文本下划线*/
text-decoration: none; /*无下划线*/
11、文字间距离
letter-spacing: 10px;/*文字与文字之间的距离*/
12、单词间距离(需要空格断开)
word-spacing: 20px;
13、文字测量
测量文字大小---------测试文字间空隙大小-------空隙/2(偶数-上下一致,奇数-上面比下面少一像素)
测量文字从上到下测量
空格的大小为当前字体大小的一半(宋体)
14、强制换行
white-space: nowrap; /*强制换行*/
white-space: normal; /*正常显示*/