文本设置: | |
---|---|
1.颜色 color 属性值:颜色的英文/16进制的颜色【】/rgb | |
2.字体 font-family 属性值:楷体 | |
3.字体大小 px pt em 16px=12pt=1em 默认字体大小为16px,微软雅黑【除非自己单独设置过】 | |
4.加粗 font-weight 属性值:bold,bolder/100~900[100~500 变细 600~900 加粗]/lighter【变细】 | |
5.倾斜 font-style 属性值:italic/oblique/normal | |
6.文本的位置 text-align 属性值:left/right/center/justify[多行文本才起作用] | |
7.行高 line-height 设置垂直居中常用【line-height属性值=height的属性值】 | |
8.text-decoration 设置线的位置 none【没有 常用在去除超链接的下划线】/line-through【删除线 降价】/undeline【下划线】/overline【上划线】 | |
9.letter-spacing【中文】/word-spacing【英文】 | |
10.文本缩进 text-indent 【首行缩进 只对首行起作用】 | |
11.文字缩写 font:font-style font-weight font-size/line-height font-family;[] |
列表属性 | ||
---|---|---|
list-style-type | 定义列表符合样式 | list-style-type:disc(实心圆)/circle(空心圆)/square(实心方块)/none(去掉符号) |
list-style-image | 将图片设置为列表符合样式 | list-style-image:url(); |
list-style-position | 设置列表项标记的放置位置。 | list-style-position:outside;列表的外面 默认值 list-style-position:inside;列表的里面 |
list-style | 简写 | list-style:none; 去除列表符号 |
背景属性 | ||
---|---|---|
background-color | 背景颜色 | background-color:red; |
background-image | 背景图片 | background-image:url(); |
background-repeat | 背景图片的平铺 | background-repeat:no-repeat/repeat/repeat-x/repeat-y; |
background-position | 背景图片的定位 | background-position:水平位置 垂直位置;可以给负值 |
background-attachment | 背景图片的固定 | background-attachment : scroll (滚动)/ fixed(固定,固定在浏览器窗口里面,固定之后就相对于浏览器窗口了) ; |
可以简写成background |