属性 | 作用 |
---|---|
font-size | 调整字体大小 |
font-family | 调整字体样式 |
font-weight | 调整字体粗细 |
用color属性指定字体颜色,指定字体颜色可以用下面这些方式:
1、 color: red;
2、 color: #ffffff; 对应RGB,全f为白,全0为黑
3、 color: rgb(255,0,0); RGB的十进制表示
4、 color: rgba(255,0,0,0.5); 最后一位指定透明度(0~1)
属性 | 作用 |
---|---|
text-align: center | 设置文本对齐方式(水平居中对齐) |
text-indent: 2em | 设置首行缩进(空两个字母) |
height: 50px | 设置高度 |
line-height: 50px | 设置行高(height=line-height时文本纵向居中) |
text-decoration | 设置文本装饰(下划线等) |
vertical-align | 设置元素垂直对齐方式 |
text-shadow | 设置阴影 |
原文:https://www.cnblogs.com/miou/p/12242366.html