不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码
网络编程
纯DIV/CSS对联漂浮广告代码(无JS)
源码网两侧漂浮。经测试,兼容IE6,IE7,Firefox浏览器。
CSS代码为:
页面代码为:
源码网两侧漂浮。经测试,兼容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.gimoo.net" 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.gimoo.net" 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.gimoo.net" 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.gimoo.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
Div CSS absolute与relative的区别小结
详细讲解两者的关系,需要配合例子,请先看例子:以下是引用片段:!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional
css实现文字垂直居中的代码第1/2页
CSS中怎样设置才能使对象中的文字垂直居中于对象,这个问题也是捆扰很多朋友的难题。现在网上的很多代码都做不到浏览器兼容。我把网上有关的方
div+css页面布局的五个小技巧
1、表单文本输入的移动选择:在文本输入栏中,如果加入了提示,来访者往往要用鼠标选取后删除,再输入有用的信息。其实只要加入onMouseOver="this.focu
编辑:一起学习网
标签:代码,例子,文本,浏览器,对象