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

CSS样式表
CSS的margin边界叠加深度剖析图文演示
CSS中Float(浮动)相关技巧文章
惊现学习CSS应该注意的方法
使用text-align:justify实现两端对齐一例
CSS整体布局声明的一些使用技巧
推荐深入理解css中的position定位和z-index属性
固定表格的高度超过指定高度就隐藏的方法
推荐个Css的filter常用滤波器属性及语句大全
用css滤镜实现的文字描边效果的代码
用css实现的带阴影的表格效果的代码
推荐个不错的表单Input的高级用法11例
flash幻灯片需要先激活ActiveX控件才能使用的又一个办法
DIV+CSS作网页容易犯的错误小结
ul+li及css制作韩国风格菜单代码
div布局的自由伸展三栏式版面的代码
几乎被设计师遗忘了的标签fieldset legend
不用javascript实现带序号的表格隔行换色的效果
用CSS实现基本条状图表效果
用javascript来控制 链接的target 属性的代码
多浏览器css兼容分析小结

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


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