版权声明
·
网站留言
·
联系我们
·
加入收藏
热门关键词:
焦点图
png图标
背景
按钮
首页
PNG图标
广告代码
网页模板
字体下载
JS代码
CSS样式
技术文档
网站常用
gif图片
JPG图片
JavaScript用户手册
flash动画
jsp编程
.net编程
网站配色
网站优化
Oracle教程
JS技术
数据库编程
网络维护
html基础
安全相关
测试相关
知识扩展
CSS技术
DIV+CSS实例
DIV+CSS教程
鼠标特效
网站常用
文字特效
时间日期
图片特效
表格图层
导航菜单
网页特效
详细内容
首页
>>
JS
>>
鼠标特效
>> 正文
[
关闭窗口
]
围绕鼠标盘旋的鸟
发布日期:2010-03-26
点击:8252
<html> <head> <title>网页特效|站点基地【zdbase.com】|---围绕鼠标盘旋的鸟</title> <meta content="text/html; charset=gb2312" http-equiv="Content-Type"> </head> <body> <script language="JavaScript"> <!-- var images='http://www.zdbase.com/work/Editor/UploadFile/201032704048658.gif';//Put your image name here!! var amount=8; //Number of images here!! var yBase = 150; var xBase = 200; var step = 0.2; var currStep = 0; var Xpos = 5; var Ypos = 5; var i = 0; var j = 0; if (document.all) { document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">') document.write('<div id="c" style="position:relative">'); for (n=0; n < amount; n++) document.write('<img src=" '+images+'" style="position:absolute;top:0px;left:0px">') document.write('</div>') document.write('</div>') function MsieMouseFollow(){ Xpos = document.body.scrollLeft+event.x-5; Ypos = document.body.scrollTop+event.y-5; } document.onmousemove = MsieMouseFollow; } else if (document.layers) { window.captureEvents(Event.MOUSEMOVE); for (ns=0; ns < amount; ns++) document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+images+"'></LAYER>"); function NsMouseFollow(evnt){ Xpos = evnt.pageX-5; Ypos = evnt.pageY-5; } window.onMouseMove = NsMouseFollow; } function Swirl(){ if (document.all) { yBase = window.document.body.offsetHeight/4; xBase = window.document.body.offsetWidth/4; } else if (document.layers) { yBase = window.innerHeight/4; xBase = window.innerWidth/4; } if (document.all) { for (i=0;i<ieDiv.all.c.all.length;i++) { ieDiv.all.c.all[i].style.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10); ieDiv.all.c.all[i].style.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10); } } else if (document.layers) { for ( j = 0 ; j < ns ; j++ ) //7 is number of NS layers! { var temp="n"+j document.layers[temp].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10); document.layers[temp].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10); } } currStep += step; setTimeout("Swirl()", 10); } Swirl(); // --> </script> </body> </html>
提示:您可以先修改部分代码再运行,复制代码和保存代码功能在Firefox下无效。
附件:
相关文章
CentOS8安装RabbitMQ
top里看到CPU高怎么确认是哪个进程
centos7设置系统时间的方法
nodejs直接导出文本文件
CentOS7用nginx部署网站的方法
Maven项目连接虚拟机里的Kafka失...
postgresql时间相差8小时
docker中配置mysql主从复制
postgresql设置用户期限及修改密...
创建索引的语法
重启postgresql数据库
linux查询占用空间大的文件夹
postgresql创建访问其他数据库的...
安装docker注意点
nodejs导出excel
idea彻底卸载的方法
postgreSQL序列nextval生...
echarts开发概要
java启动项目记录日志
postgreSQL更新表的所有者
postgreSQL还原数据库后示rel...
linux查看端口被哪个进程占用的方法
关于我们
-
版权声明
-
联系我们
-
网站留言
-
网站地图
Copyright © 2010 zdbase.com All Rights Reserved.
苏ICP备15039389号
可人软件设计