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

CSS样式表
面向对象的CSS应用
css 文字按钮实现样式submit按钮以文本的形式显示出来
CSS 选择符的用法和实例
CSS a:hover伪类在IE6下的问题
IE6下CSS定义DIV高度的问题
CSS网页实例 利用box-sizing实现div仿框架结构实现代码
CSS样式表与HTML网页的关系分析
设计稿进行页面制作的流程和注意事项
CSS压缩的技巧与工具
CSS @font-face属性实现在网页中嵌入任意字体
通过css样式控制单元格文本超长省略
运用比较纯的CSS打造很Web2.0的按钮
CSS expression 隔行换色效果
CSS 制作有弹性的日历表
CSS Cookbook创建水平导航菜单
CSS Cookbook 创建文字导航菜单和翻转特效
区别div和span、relative和absolute、display和visibility
让页脚紧贴页面底部的CSS代码
Firefox下div层被Flash遮住的解决方法
ins标签什么时候使用

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 304 ::
收藏到网摘: 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>