博思互联建站网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

50元买空间送源码包安装 50元买1年美国空间送本站任意一款源码 快速赚取金币| 免费加入VIP

港台体验150M空间 免费备案港台空间 美国空间 com域名只需55元| pw域名38元

友情链接自助申请 - 博思建站网论坛广告位 博思建站网论坛广告位 - 博思建站网论坛广告位 博思建站网论坛 Archiver |论坛日志 | 论坛相册

搜索
热搜: 推广 免费 空间
论坛长期招聘版主 论坛专用2G双线主机,386元/年 韩国超速1G主机,免备案198元/年 精英1.2G国内外可选-特价198元/年
双线20人合租-20G仅698元/年 11G 国内外论坛专用主机126元/月 500M韩国免备案爆快 126元/年 500M国内双线主机快 126元/年
文字广告位招租 80元/月 文字广告位招租 80元/月 文字广告位招租 80元/月 文字广告位招租 80元/月
查看: 1195|回复: 0

[素材] dedecms对联广告代码

[复制链接]
发表于 2013-8-4 17:42:31 | 显示全部楼层 |阅读模式

本站源码安装服务:虚拟主机安装20元   win服务器安装30元   如果是买的本站源码,虚拟主机安装只需要15元

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title></title>
  6. <style type="text/css">
  7. #souabAds1{
  8. position: absolute;
  9. top: 10px;
  10. left: 10px;
  11. }
  12. #souabAds2{
  13. position: absolute;
  14. top: 10px;
  15. right: 10px;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <div id="souabAds1">
  21. <a href="http://bbs.idcbs.com" target="_blank"><img src="http://ubmcmm.baidustatic.com/media/v1/0f000Qtp4iI1lPVETOCDsf.jpg" border="0"></a>
  22. </div>
  23. <div id="souabAds2">
  24. <a href="http://bbs.idcbs.com" target="_blank"><img src="http://ubmcmm.baidustatic.com/media/v1/0f000Qtp4iI1lPVETOCDsf.jpg" border="0"></a>
  25. </div>
  26. <div style="height: 0px"></div>
  27. <script type="text/javascript">
  28. function StayPosition(speed)
  29. {
  30.    this.objs = [];
  31.    this.speed = speed || 0.1;
  32.    this.timer = this.round = this.obj = this.end = null;
  33.    if(StayPosition.initialize !== true){
  34.                 function correct(func, obj){
  35.                    return function(){
  36.                            func.call(obj);
  37.                    }
  38.                 }
  39.                 StayPosition.prototype.start = function(){
  40.                   this.timer = setInterval(correct(this.run, this), 33);
  41.                 }
  42.                 StayPosition.prototype.stop = function(){
  43.                   clearInterval(this.timer);
  44.                 }
  45.                 StayPosition.prototype.capitalize = function(prop){return prop.replace(/^[a-z]/, function(a){return a.toUpperCase();})}
  46.                 StayPosition.prototype.add = function(dom, prop){
  47.                    var offset = prop ? "offset" + this.capitalize(prop) : "offsetTop";
  48.                    var scroll = prop ? "scroll" + this.capitalize(prop) : "scrollTop";
  49.                    prop = prop ? prop : this.offset.slice(6).toLowerCase();
  50.                    this.objs.push({"dom": dom, "prop": {"size": dom[offset], "name": prop, "offset": offset, "scroll": scroll}});
  51.                 }
  52.                 StayPosition.prototype.run = function(){
  53.                    for(var i = 0, l = this.objs.length; i < l; i++){
  54.                           this.obj = this.objs[i];
  55.                           this.end = (document.documentElement[this.obj.prop.scroll] || document.body[this.obj.prop.scroll]) + this.obj.prop.size;
  56.                           if(this.end != this.obj.dom[this.obj.prop.offset]){
  57.                                   this.round = this.end - this.obj.dom[this.obj.prop.offset] > 0 ? Math.ceil : Math.floor;
  58.                                   this.obj.dom.style[this.obj.prop.name] = this.obj.dom[this.obj.prop.offset] + this.round((this.end - this.obj.dom[this.obj.prop.offset]) * this.speed) + "px";
  59.                           }
  60.                    }
  61.                 }
  62.         }
  63.         StayPosition.initialize = true;
  64. }
  65. var o = new StayPosition(0.2);
  66. o.add(document.getElementById("souabAds1"), "top");
  67. o.add(document.getElementById("souabAds2"), "top");
  68. o.start();
  69. //-->
  70. </script>
  71. </body>
  72. </html>
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

a

QQ|小黑屋|手机版|Archiver|博思互联建站网 ( 蜀ICP备09002004号-1 )

GMT+8, 2024-5-12 16:12 , Processed in 0.084162 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表