Div样式设置
原则
先定位
从外到内
设计
一 position
left
top
right
buttom
二 float
三 margin
四 background
五 border
六 padding
七 width
height
八 overflow
九 font
十 text-align
verctor-align
十一 cursor
十二 clip:设置剪辑矩形
clip:rect(top right bottom left);设置上下左右的距离,但此时要把position指定为absolute。
十三 ilter:滤镜效果
opacity:value (FF专用,value的取值为0至1之间的小数)
ilter:alpha(opacity=value)(IE专用,value取值:0至100)
JavaScript改变DIV的透明度可用下面的方法:
FF中:document.getElementById('tdiv').style.opacity='0.9';
IE中:document.getElementById('tdiv').style.filter='alpha(opacity=90)';