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

所属分类: 网络编程 / CSS/HTML 阅读数: 608
收藏 0 赞 0 分享
纯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>   
更多精彩内容其他人还在看

input文本框样式代码实例

input文本框样式代码实例
收藏 0 赞 0 分享

div+css实现自适应宽度按钮

div+css实现自适应宽度按钮
收藏 0 赞 0 分享

h1标签的使用技巧

h1标签的使用技巧
收藏 0 赞 0 分享

base href 使用方法详解

base href 使用方法详解
收藏 0 赞 0 分享

html label标签的使用教程

html label标签的使用教程
收藏 0 赞 0 分享

使用CSS不用程序实现文字自动截断 用省略号代替

使用CSS不用程序实现文字自动截断 用省略号代替
收藏 0 赞 0 分享

CSS hack实现 CSS完美兼容IE6/IE7/FF的通用方法

CSS hack实现 CSS完美兼容IE6/IE7/FF的通用方法
收藏 0 赞 0 分享

网页布局+纯CSS纵向下拉菜单 IE6/IE7兼容

网页布局+纯CSS纵向下拉菜单 IE6/IE7兼容
收藏 0 赞 0 分享

CSS图片拼合生成器只需上传zip包即可

CSS图片拼合生成器只需上传zip包即可
收藏 0 赞 0 分享

用iframe margin实现调用其他网页的某一区域的方法

用iframe margin实现调用其他网页的某一区域的方法
收藏 0 赞 0 分享
查看更多