大小:
宽度:width
高度:height
背景:
background-color 背景色
background-image 背景图片
background-repeat 背景图的平铺方式
background-position 背景图片位置
background-attachment 设置背景图片是否滚动(需要与overflow:scroll配合使用)
background-size 背景图的大小 200px 200px
字体:
font-family 字体样式
font-size 字体大小 12px 14px
font-styleitalic 倾斜
font-weightbold 加粗
text-decoration:
underline 下划线
overline 上划线
line-through 删除线
none 没有,用来去掉超链接的下划线
color 字体颜色
对齐方式:
text-align水平对齐方式
vertical-align垂直对齐方式,配合行高使用
line-height行高
text-indent缩进 单位像素
边界边框:
margin外边距 上右下左
padding内边距 上右下左 (如果加了内边距,该元素会相应的变大)
border1px solid #60F 简写方式 第一个边框粗细 第二个边框样式 第三个框颜色
列表方块:
list-stylenone将列表前面的序号去掉
list-style-image可以将前面的序号变为图片
格式与布局:
位置:
positionfixed 固定相对于浏览器边框位置固定
absolute 绝对位置相对于父级元素(浏览器,绝对定位的上级)
relative 相对位置相对于自身应该出现的位置
top 距离上边的距离
right 距离右边的距离
bottom 距离下边的距离
left 距离左边的距离
流:
float left 向左流
right 向右流
clear both 清掉流
z-index分层 值越大越靠上
其它:
display 显示block和隐藏none,不占位置
visibility 显示visible和隐藏hidden,占位置
overflow 超出范围 hidden隐藏
透明:opacity:0.5;-moz-opacity:0.5;filter:alpha(opacity=50)
圆角:border-radius:5px;
阴影:box-shadow:0 0 5px white;