css属性
文字属性:
color:文字颜色;通常使用的是十六进制表示法和单词表示法
font-size:12px/14px/16/px; 文字大小
font-family:宋体/黑体/微软雅黑 文字字体
font-style:normal(正常)/italic(斜体) 文字样式
font-weight:100-900,normal/bold; 文字加粗
border-bottom:1px solid blue;
段落属性:
text-align:center/left/right;文字的水平对齐方式
text-indent:2em/20px; 文本缩进
text-decoration:none/underline/overlive/line-through 文本修饰 无/下划线/上划线/删除线 去掉链接的下划线用这个不是font-style
line-height:22px/150%/1.5 ps测量的方法是从第一行开始到第二行结束
background-color:#ff0 背景颜色
background-image:url(路径) 背景图像
background-repeat:repeat/no-repeat/repeat-x/repeat-y 背景图像是否需要重复
background-position:x y;
x:left right center 20px 20%;
y:top bottom center 20px 20%;
background:#ff url(../images/star.jpg)no-repeat left top;
需要添加超链接的图像就要用插入图像:<a href="#"><img src=""></a>
不需要添加超链接的图像一般的时候都使用背景图像,用background这个css属性
margin:上 右 下 左 ;
vertical-align:top/middle/bottom; 垂直方向对齐方式
列表属性
list-style:none;去掉无序列表/有序列表的项目符号
list-style-type:circle/square/disc/lower-alpha
list-style-image:url();
list-style-position:inside/outside;
list-style:url() inside;
文字属性:
color:文字颜色;通常使用的是十六进制表示法和单词表示法
font-size:12px/14px/16/px; 文字大小
font-family:宋体/黑体/微软雅黑 文字字体
font-style:normal(正常)/italic(斜体) 文字样式
font-weight:100-900,normal/bold; 文字加粗
border-bottom:1px solid blue;
段落属性:
text-align:center/left/right;文字的水平对齐方式
text-indent:2em/20px; 文本缩进
text-decoration:none/underline/overlive/line-through 文本修饰 无/下划线/上划线/删除线 去掉链接的下划线用这个不是font-style
line-height:22px/150%/1.5 ps测量的方法是从第一行开始到第二行结束
重要的作用:可以使一行文本上下垂直居中,line-height:height
text-transform:capitalize(首字母大写) | uppercase(全部大写) | lowercase(全部小写)
word-spacing:20px;单词与单词之间的距离
letter-spacing:20px;字母与字母之间的距离、汉字与汉字之间的距离
white-space:normal/nowrap(强制不换行)
background-color:#ff0 背景颜色
background-image:url(路径) 背景图像
background-repeat:repeat/no-repeat/repeat-x/repeat-y 背景图像是否需要重复
background-position:x y;
x:left right center 20px 20%;
y:top bottom center 20px 20%;
background:#ff url(../images/star.jpg)no-repeat left top;
需要添加超链接的图像就要用插入图像:<a href="#"><img src=""></a>
不需要添加超链接的图像一般的时候都使用背景图像,用background这个css属性
margin:上 右 下 左 ;
vertical-align:top/middle/bottom; 垂直方向对齐方式
列表属性
list-style:none;去掉无序列表/有序列表的项目符号
list-style-type:circle/square/disc/lower-alpha
list-style-image:url();
list-style-position:inside/outside;
list-style:url() inside;