如何通过JS 动态改变CSS样式0
豆豆dou...2013.09.15浏览640次分享举报
.TLIWREGION3CSS {
position:absolute;
left:32px;
top:452px;
z-index:1100;
width:213px;
height:93px;
clip:rect(0px,217px,97px,0px);
font-weight:normal;
font-style:normal;
text-decoration: none;
font-size:13px;
}
.TLIWREGION2CSS {
position:absolute;
left:32px;
top:36px;
z-index:1100;
width:213px;
height:116px;
clip:rect(0px,217px,120px,0px);
font-weight:normal;
font-style:normal;
text-decoration: none;
font-size:13px;
}
.TLIWREGION1CSS {
position:absolute;
left:32px;
top:189px;
z-index:1100;
width:213px;
height:236px;
clip:rect(0px,217px,240px,0px);
font-weight:normal;
font-style:normal;
text-decoration: none;
font-size:13px;
}
通过JS 动态把以上CSS代码clip:rect(0px,***px,***px,0px); 带*号的加上4
比如:
clip:rect(0px,100px,100px,0px);
以上加上4后是
clip:rect(0px,104px,104px,0px);
那么其他的
clip:rect(0px,332px,354px,0px);
加上是
clip:rect(0px,336px,358px,0px);
以此类推
假设我一个页面中有一个100个以上的clip:rect(0px,***px,***px,0px);
那么他们多可以这样改变
可以看看这个帖子说的要求
http://bbs.blueidea.com/thread-3058964-1-1.html