不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码
纯div/css对联漂浮广告代码(无js)
源码网两侧漂浮。经测试,兼容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;}
页面代码为:
<div class="r1"><a href="//www.jb51.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="//www.jb51.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="//www.jb51.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="//www.jb51.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
-
-
-
-
HCIE总结第四天
HCIE第四天总结CSS技术:为了解决单一VLAN负载均衡所以出现了新的 技术:CSS(堆叠技术)堆叠技术原理:...
[阅读全文]
网友评论