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

CSS样式表
CSS教程:制作网页中常用的5个CSS属性
网页制作理论:精确还原设计稿
CSS教程:Firefox浏览器下margin-top问题
CSS教程:li标记在IE下产生间距
CSS实例教程:CSS制作虚线的2种方法
CSS教程:网页中英文字体的设置
根据IE版本不同调用不同CSS样式文件
CSS网页布局:tbody标签与thead和tfoot标签
网页制作技巧:CSS网页布局中文排版心得
网页制作CSS教程:自适应圆角
Css Hack:Pixel Perfect
OOcss教程:认识OOCSS和简单应用OOCSS
网页制作教程:面向对象的CSS应用
CSS写法:不同组合间的优先级及浏览器的支持性
CSS sprite实例教程:li:hover修改密码
利用负边距技术制作自适应宽度布局的网页
WEBJX收集漂亮的大背景网页设计实例
使用一张或两张图片创建大背景网站
CSS教程:CSS选择符的用法和实例
CSS实例:a:hover伪类在IE6下的问题

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


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