欢迎来到代码驿站!

HTML代码

当前位置:首页 > 网页前端 > HTML代码

不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码

时间:2022-03-13 12:55:58|栏目:HTML代码|点击:
纯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="https://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="https://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="https://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="https://www.jb51.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>   

上一篇:w3c技术架构介绍

栏    目:HTML代码

下一篇:有衬线字体与无衬线字体比较

本文标题:不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码

本文地址:http://www.codeinn.net/misctech/196089.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有