当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码

CSS样式表
CSS中的text-shadow属性
利用CSS3特性和浏览器中的工具进行网页设计
使用CSS3将你的网站设计推向未来
网页设计师福音:CSS网格布局生成器
CSS教程:汇总让IE6崩溃的几种方法
CSS教程:快速提升设计可读性和维护性
HTML5和CSS3给网站设计带来出色效果
CSS选择器大全
TypeSelect实现网页嵌入字体
CSS样式表尽量放到网页头部
CSS3的优势以及网页设计师如何使用CSS3技术
CSS样式表中引用图片地址在各浏览器中的差异
5种给CSS样式表瘦身减肥的方法
英文教程:50个网页制作中应用的CSS技巧
用CSS3将你的设计带入下个高度
CSS教程:新的图像替换方法
创造100%功能自适应css布局的行之有效的方法
轻松搞定IE的CSS制作网页技巧3则
网页设计应该熟知的CSS 3.0技术
制作网页常用的50种CSS工具

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 326 ::
收藏到网摘: n/a

两侧漂浮。经测试,兼容IE6,IE7,Firefox浏览器 纯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="http://www.ruanchen.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="http://www.ruanchen.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="http://www.ruanchen.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="http://www.ruanchen.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>