1.字体样式:
大小 font-size:20px;
粗细 font-weight;bold;
字体 font-family:“楷书”;
风格斜体 font-style:italic;
颜色 color:‘red’;
2.文本样式:
- 首行缩进:
text-indent:20px;
缩进两个字符通常使用
text-indent:2em;
实际代码中通常使用div的padding内边距
- 文本针对当前容器居中
text-align: center;
- 设置行高
字体设置行高为容器的行高时会上下居中显示
line-height:26px;
- 设置装饰 下划线/上划线/删除线/无线条
text-decoration: underline/overline/line-through/none;
3.a标签的伪类样式
- 鼠标单击前
a:link{
color:blue;
}
- 鼠标单击后
a:visited{
color:brown;
text-decoration:underline;
}
- 鼠标悬停
a:hover{
color:yellow;
}
- 鼠标单击未释放
a:active{
color