文字属性:
1.定义字体(font-family)
p { font-family: "黑体", "宋体", "新宋体"; }
2.定义文字大小(font-size)
.f12 { font-size: 12px; }
3.定义文字样式(font-style)
.ita { font-style: italic; }
4.定义文字粗细(font-weigh)
.b { font-weight: bold; }
文本属性
1.首行缩进(text-indent)
{ text-indent: 24px; }
2.文本颜色(color)
.lv { color: green; }
3.文本对齐属性(text-align)
.zhong { text-align: center; }
4.文本修饰(text-decoration)
.shang { text-decoration: overline; }
5.禁止折行
white-space: nowrap
6.单词间距
word-spacing: 30px
7. 字母控制
text-transform: uppercase
8. 行高
line-height: 2
9. 字符间距
letter-spacing: 20px
背景属性
1.背景颜色属性(background-color)
body { background-color:red ;}
2.背景图片(background-image)
body { background-image:url(http://www.cainiao8.com/images/logo.gif);}
3.背景图片的重复设置(background-repeat)
不重复;background-repeat:no-repeat;
只在水平方向重复;background-repeat:repeat-x
只在垂直方向重复: background-repeat:repeat-y
4.背景图片位置(background-position)
background-position:center;
5.将背景图片固定在页面的某个位置(background-attachment)
background-attachment:fixed;