博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
网页两侧悬浮广告js代码
阅读量:7042 次
发布时间:2019-06-28

本文共 1183 字,大约阅读时间需要 3 分钟。

hot3.png

var delta=0.08 var collection; function floaters() { this.items = []; this.addItem = function(id,x,y,content)   { document.write('
'+content+''); var newItem = {}; newItem.object = document.getElementById(id); newItem.x = x; newItem.y = y; this.items[this.items.length] = newItem;   } this.play = function()   { collection = this.items setInterval('play()',10);   } } function play() { for(var i=0;i
0?1:-1)*Math.ceil(Math.abs(dx)); followObj.style.left=followObj.offsetLeft+dx + 'px'; } if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) { var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta; dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy)); followObj.style.top=followObj.offsetTop+dy + 'px'; } followObj.style.display = ''; } } var theFloaters = new floaters(); //右面 theFloaters.addItem('followDiv1','document.body.clientWidth-106',138,'
'); //左面 theFloaters.addItem('followDiv2',6,138,'
'); theFloaters.play();

转载于:https://my.oschina.net/lantianbaiyun/blog/538659

你可能感兴趣的文章
web服务篇
查看>>
Maven&Nexus安装及使用
查看>>
LVS
查看>>
css3中translateY、translateX的使用
查看>>
创建mysql触发器
查看>>
shell 从文件按行读
查看>>
笔记3
查看>>
《Linux菜鸟入门》网关及DNS
查看>>
Python~~简介介绍
查看>>
使用cocoaPods,导入第三方库头文件没有自动联想
查看>>
锁定数据行 for update和for update nowait
查看>>
项目管理工具必须具备的5个功能
查看>>
PHP+socket+SMTP、POP3协议发送、接收邮件
查看>>
我的重构--重构案例2
查看>>
大快网站:如何选择正确的hadoop版本
查看>>
dhcp snopping及华三交换机配置
查看>>
java基础-IO
查看>>
python多线程之创建线程
查看>>
我的友情链接
查看>>
sersync同步配置
查看>>