源码网 - 中国第一源码门户
选择镜像:网通镜像 - 电信主站
会员登录/控制面版您的位置: 学院首页 >> 网页制作 >> CSS 学习 >> 详细内容
 

推荐文章

 
 

热点文章

  • 绝对经典:DIV+CSS菜单.比flash更逼真
  • 纯DIV/CSS对联漂浮广告代码(无JS)
  • CSS实现选项卡代码
  • 在网页中实现细线表格边框的方法
  • css中的:before:after这两个伪类用法
  • 几个漂亮按钮的css样式
  • 用css来实现标题内容超出长度范围自动省略,且有鼠标提..
  • 利用css设置页面背景固定(背景水印效果)
  • CSS网页布局DIV垂直居中的各种方法
  • DIV+CSS布局入门教程(六) -- 关于ID和CLASS
  • 用层遮盖select下拉菜单
  • DIV+CSS技术入门学习
 
 

相关文章

  • 技巧:让广告代码不再影响你的网页加载速度
 
 

纯DIV/CSS对联漂浮广告代码(无JS)

  • 阅览次数:
  • 文章来源: CP整理
  • 原文作者: 无色幽默
  • 整理日期: 2007-12-28
  • 发表评论
  • 字体大小:
  • 小
  • 中
  • 大

演示效果:www.codepub.com
源码网两侧漂浮。经测试,兼容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="/d/adclick.php?id=11&url=http://www.25idc.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div> 
<div class="r2"><a href="/d/adclick.php?id=11&url=http://www.25idc.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div> 
<div class="l1"><a href="/d/adclick.php?id=11&url=http://www.25idc.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div> 
<div class="l2"><a href="/d/adclick.php?id=11&url=http://www.25idc.com" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div> 

原创文章,转载必须注明出处!
出处:源码网,www.codepub.com

上一篇:使用php的curl采集diszuz论坛
下一篇:Python 3.0 一个巨大的改变
  • 网友评论:
  • 查看所有评论
  • 我要发表评论
您的网名:
留言主题:
你要发表的内容: