1、段落控制:
①text-indent: 首行缩进(使用负值时,首行被缩进到左边)
②text-align: 文本的水平对齐方式(left,right,center)
③text-decoration: 文本装饰线
none 默认,标准的文本
underline 文本下的一条线
overline 文本上的一条线
line-through 穿过文本的一条线
blink 闪烁的文本
④letter-spacing: 字符间距(字符间的空白)
⑤text-transform: 字母大小写转换(控制文本大小写)
none 默认,标准文本
capitalize 文中的每个单词以大写字母开头
uppercase 仅有大写字母
lowercase 仅有小写字母
例:
2、文本控制:
①color:颜色(建议使用十六进制表示颜色)
②font-style:文字样式(最常用于规定倾斜文本)
normal 文本正常显示
italic 文本斜体显示
oblique 文本倾斜显示
(通常情况下,italic 和 oblique 文本在 web 浏览器中看上去完全一样。)
③font-weight:文字粗细
bold 将文本设为粗体,数字400等于normal,700等于bold
④font-size:文字大小(有像素,em,百分比三种表示方法)
⑤font-family:字体系列(通用字体,具体字体2种)
⑥line-height:行高(行间的距离)
例:
3、背景控制:
①background(background-color): 背景颜色
②background-image: 背景图片
③background-repeat: 背景图重复(no-repeat 背景图仅显示一次)
④background-attachment: 背景图粘贴方式
⑤background-position: 背景图位置
例: