源码网两侧漂浮。经测试,兼容IE6,IE7,Firefox浏览器。
CSS代码为:
.r1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);right:20px;}
.r2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);right:20px;}
.l1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);left:20px;}
.l2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);left:20px;}
页面代码为:
<divclass="r1"><ahref="/d/adclick.php?id=11&url=http://www.25idc.com"target='_about'><img src="/js/pic/piao-l-1.gif" width="80"height="80" border="0" /></a></div>
<div class="r2"><ahref="/d/adclick.php?id=11&url=http://www.25idc.com"target='_about'><img src="/js/pic/piao-l-1.gif" width="80"height="80" border="0" /></a></div>
<div class="l1"><ahref="/d/adclick.php?id=11&url=http://www.25idc.com"target='_about'><img src="/js/pic/piao-l-1.gif" width="80"height="80" border="0" /></a></div>
<div class="l2"><ahref="/d/adclick.php?id=11&url=http://www.25idc.com"target='_about'><img src="/js/pic/piao-l-1.gif" width="80"height="80" border="0" /></a></div>
原创文章,转载必须注明出处!
出处:源码网,www.codepub.com
联系客服