本来想做一个对联广告,奈何网上的js方案都很晃眼。如果IE6的fixed可以生效的话,就不必要那么麻烦了。这里的广告只需要使用css即可。
/*防止在IE6中抖动*/
html{
_background:#fff url(about:blank) no-repeat fixed 0 0;
}
/*这个就是对联的div了*/
#leftCouplet {
position:fixed;
right:20px;
top:275px;
width:100px;
height:300px;
z-index:300;
}
/*针对IE6*/
*html #leftCouplet {
position:absolute;
bottom:auto;
top:expression(eval(document.documentElement.scrollTop)+275)
}
虽然很不赞成css中使用表达式,可是要对付彪悍的IE6,只能如此