一、常用属性:
1、Height:设置DIV的高度。Width:设置DIV的宽度。
2、margin:用于设置DIV的外延边距,也就是到父容器的距离。margin-left、margin-right、margin-top、margin-bottom。
3、padding:用于设置DIV的内边距。padding-left、padding-right、padding-top、padding-bottom。
4、position:设置DIV的定位方式。left、top、right、bottom。
5、z-index:设置DIV的层叠顺序。
6、font:指定DIV中文本的样式,其后可跟文本的多个样式。font-family、font-weight、font-size、font-style、color、text-align。
text-decorator:用于文本的修饰。其值有none underline overline line-through和blink的组合。
text-indent、text-transform:设置文本的字母大小写。其值有lowercase uppercase capitalize(首字母大写) none。
7、overflow:内容溢出控制,其值有scroll(始终显示滚动条)、visible(不显示滚动条,但超出部分可见)、 auto(内容超出时显示滚动条)、 hidden(超出时隐藏内容)。
8、direction:内容的流向。其值有ltr(从左至右)、rtl(从右至左)。
9、line-height:指定文本的行高。
10、Word-spacing:字间距。
11、border:设置DIV的边框样式。border-width、border-color、border-style、border-top、border-bottom、border-left。
12、display:设置显示属性。其值有block、none。
13、float:设置DIV在页面上的流向,其值有left(靠左显示)、right(靠右显示)、none。
14、background:设置DIV的背景样式。background-color、background-attachment:背景图像的附加方式,其值有scroll、fixed。 background-image、background-repeat、no-repeat(不平铺)、repeat(两个方向平铺)、repeat-x(水平方向平铺)。
background-position:在DIV中定位背景位置。其值有top bottom left right的不同组合。也可以以用坐标指定具体的位置。
二、一些特殊效果:
1、cursor:设置DIV上光标的样式。
2、clip:设置剪辑矩形。
3、filter:滤镜效果。