字体 文本 和 background
字体属性
font-family 类型
font-size 大小
font-style风格
font-weight 粗细
font: italic bolder 20px “宋体”;(color不能写在font里面)
文本属性
color red
text-align 设置元素水平对齐方式right
text-indent 设置首行文本的缩进25px
text-height设置文本的行高20px
text-decoration 设置文本的装饰none/underline/overline(上划线)/line-through(删除线)
文本排版
left right center justify(文本两端对齐)
vertical-align垂直对齐方式
属性:middle top bottom
伪类选择器
a:hover / a:active/ a:link/ a:visited
list 列表属性
list-style:none/disc/square/circle/decimal
设置背景
background-color
background-image:url(图片路径) no-repeat
背景定位
background-position
.title{
font:15px bolder;
color:#FFF;
text-indent:1em;
line-height:35px;
background:red url(…/image/arrow-down.gif)205px 10px no-repeat
}
盒子模型
border:1px solid red;
外边距
margin margin-top margin-right margin-bottom margin-left
网页居中对齐:margin:0px auto;
内边距
padding padding-left padding-right padding -top padding-bottom
border-radius 制作特殊图形
div{
border:1px solid red;
width:;
color:;
background:;
padding:;
margin:;
}