php对联广告代码,网站漂浮对联广告代码

php对联广告代码,网站漂浮对联广告代码下面是网站漂浮对联的 JS 脚本 复制 贴进记事本儿里面 然后保存 AD couplet js 就 OK 了 vardelta 0 15varcollect functionfloa this items this addItem function id x y content document write content varnewItem

下面是网站漂浮对联的JS脚本,复制,贴进记事本儿里面,然后保存AD_couplet.js就OK了~~~

var delta=0.15

var collection;

function floaters() {

this.items = [];

this.addItem = function(id,x,y,content)

{

document.write(‘

‘+content+’

‘);

var newItem = {};

newItem.object = document.getElementByIdx_xx(id);

newItem.x = x;

newItem.y = y;

this.items[this.items.length] = newItem;

}

this.play = function()

{

collection = this.items

setInterval(‘play()’,10);

}

}

function play()

{

if(screen.width<=800)

{

for(var i=0;i

{

collection[i].object.style.display = ‘none’;

}

return;

}

for(var i=0;i

{

var followObj = collection[i].object;

var followObj_x = (typeof(collection[i].x)==’string’?eval_r(collection[i].x):collection[i].x);

var followObj_y = (typeof(collection[i].y)==’string’?eval_r(collection[i].y):collection[i].y);

if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {

var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;

dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));

followObj.style.left=followObj.offsetLeft+dx;

}

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;

}

followObj.style.display = ”;

}

}

var theFloaters = new floaters();

theFloaters.addItem(‘followDiv1′,’document.body.clientWidth-108’,2,”);

theFloaters.addItem(‘followDiv2’,8,2,”);

theFloaters.play();

然后,在你需要添加对联的界面,添加调用下面的语句:

(责任编辑:admin)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/205303.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月19日 下午6:19
下一篇 2026年3月19日 下午6:20


相关推荐

  • Softmax函数求导

    Softmax函数求导来源:https://blog.csdn.net/zt_1995/article/details/62227603其实整个推导,上面这个图片已经介绍得十分清楚了,但是仍有很多小步骤被省略掉了,我会补上详细的softmax求导的过程:…

    2025年6月2日
    7
  • SparkStreaming之foreachRDD

    SparkStreaming之foreachRDD首先我们来对官网的描述了解一下。DStream中的foreachRDD是一个非常强大函数,它允许你把数据发送给外部系统。因为输出操作实际上是允许外部系统消费转换后的数据,它们触发的实际操作是DStream转换。所以要掌握它,对它要有深入了解。下面有一些常用的错误需要理解。经常写数据到外部系统需要创建一个连接的object(eg:根据TCP协议连接到远程的服务器,我们连接外部数据库需要自己的句柄

    2022年6月15日
    47
  • pycharm打包exe时加上窗体及exe桌面图标

    pycharm打包exe时加上窗体及exe桌面图标一 pycharm 打包 exe 时加上窗体及 exe 桌面图标 1 首先添加图片文件转 py 文件得工具 pyrcc 打开 File 中的 Settings2 按步骤添加工具名称 Name PyqrcProgram C anaconda3 Scripts pyrcc5 exeArguments FileNameFile oFileNameWit rc pyWorkin

    2026年3月17日
    2
  • linux pstree乱码,pstree下显示乱码解决

    linux pstree乱码,pstree下显示乱码解决今天使用 pstree 想查看一下信息 结果发现 emailprotect pstreeinit 忖 atd 忖 crond 忖 events 0 忖 aio 0 忖 kauditd 忖 kblockd 0 忖 khelper 忖 kmirrord 忖 2 pdflush 怎么都是乱码呢 难道编码设置有问题 查看

    2026年3月17日
    2
  • vwmare 15“无权输入许可证密钥…”与出现新问题hadoop集群无法启动

    vwmare 15“无权输入许可证密钥…”与出现新问题hadoop集群无法启动1 您无权输入许可证密钥 请使用系统管理员帐户重试 问题与解决方法 2 导入 Hadoop 文件后 hadoop 集群无法成功启动问题与解决方法

    2026年2月3日
    11
  • Android LayoutParams详解「建议收藏」

    Android LayoutParams详解「建议收藏」在平时的开发过程中,我们一般是通过XML文件去定义布局,所以对于LayoutParams的使用可能相对较少。但是在需要动态改变View的布局参数(比如宽度、位置)时,就必须要借助这个重要的类了。本文将结合具体场景详细讲解LayoutParams的相关知识。

    2026年2月12日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号