1、字符颜色:color:red;
color属性的值,可以是英语单词,比如red、blue、yellow等等;也可以是rgb、十六进制。
2、字号大小:font-size:40px;
font就是“字体”。size就是“尺寸”。px就是“像素”(作为单位,必须写)。
3、背景颜色:background-color:blue;
background即背景;color即颜色。
4、加粗:font-weight:bold;
font是“字体”,weight是“重量”,bold是“加粗”。
5、不加粗:font-weight:normal;
normal是正常的意思。
6、斜体:font-style:italic;
italic就是“斜体”。
7、下划线:text-decoration:underline;
decoration就是“装饰”的意思。
没有下划线:text-decoration:none;
8、去掉列表小圆点:list-style:none;
9、文本居中:text-align:center;
文本居左:text-align:left;(文本默认居左,所以这个属性一般没有用)
文本居右:text-align:right;
10、文本行高:
line-height:10px;
10、首行缩进两字符:text-indent:2em;
indent就是“缩进”的意思
网友评论