一:背景
1.background-color,为元素设置背景色。p{ background-color:gray; }//默认为透明也可以用#00000十六进制还可以用rgb来表示。
2.background-image,背景图片默认null,body{ background-image: url("./img/1.jpg");}.//可以将背景图片放在任意位置。
3.background-repeat,背景重复/平铺,body{ background-image: url("./img/1.jpg"); background-repeat:repeat/repeat-x/repeat-y/no=repeat}.//参数分别为:水平和垂直方向都平铺,水平平铺,垂直平铺,不平铺。
4.background-position,背景图片定位,body{ background-image: url("./img/1.jpg"); background-position:center/top/right/left/bottom;}.
5.background-attachment,背景关联/图片是否随之滚动。body{ background-image: url("./img/1.jpg"); background-attachment: fixed/scroll}.//参数:固定,默认为随内容滚动
二:文本
1.text-indent,文本缩进。p{ text-indent: 10em;}
2.text-align,文本对齐。p{ text-align:left/center/right}
3. word-spacing,字间距,word-spacing:30px;//只对字母有效,中文无效。
4.letter-spacing,字母间距,letter-spacing:20px;//对任意字符有效。
5.text-transform, 字符转换,text-transform:none|capitalize|uppercase|lowercase;//默认未发生转换/每个单词首字母转为大写/转为大写/转为小写。
6.text-decoration,文本装饰,text-decoration:none|underline|overline|lin-through|blink;
三:字体
1.font-family,字体设置,应用到body中。
2.font-style,字体风格,参数normal/italic/oblique;默认/斜体/斜体
3.font-weigth,粗体,参数normal/bolder...;默认/粗体
1283

被折叠的 条评论
为什么被折叠?



