爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
跟随鼠标时钟(三)
跟随鼠标时钟(三)
日期:2014-05-18 浏览次数:20163 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中 <script language="JavaScript"> <!-- fCol='00ffff';//face colour. dCol='fff000';//dot colour. hCol='ff0000';//hours colour. mCol='00ff00';//minutes colour. sCol='7788ff';//seconds colour. ClockHeight=35; ClockWidth=35; ClockFromMouseY=80; ClockFromMouseX=5; //Alter nothing below! Alignments will be lost! ns=(document.layers); ie=(document.all); h=3; m=4; s=5; face='1 2 3 4 5 6 7 8 9 10 11 12'; face=face.split(' '); n=face.length; speed=0.6; ymouse=0; xmouse=0; scrll=0; p="<font face=Arial size=1 color="+fCol+">"; e=360/n; HandHeight=ClockHeight/4; HandWidth=ClockWidth/4; HandY=0; HandX=0; scrll=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i < 37; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0} Dy=new Array();Dx=new Array();DY=new Array();DX=new Array(); for (i=0; i < n; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0} if (ns){ for (i=0; i < n; i++) document.write('<layer name="nsN'+i+'" top=0 left=0 height=15 width=15><center>'+p+face[i]+'</font></center></layer>'); for (i=0; i < n; i++) document.write('<layer name="nsD'+i+'" top=0 left=0 bgcolor='+dCol+' clip="0,0,2,2"></layer>'); for (i=0; i < h; i++) document.write('<layer name=nsH'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>'); for (i=0; i < m; i++) document.write('<layer name=nsM'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>'); for (i=0; i < s; i++) document.write('<layer name=nsS'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>'); } if (ie){ document.write('<div id="On" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < n; i++) document.write('<div id="ieN" style="position:absolute;width:15px;height:15px;text-align:center">'+p+face[i]+'</font></div>'); document.write('</div></div>'); document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < n; i++) document.write('<div id="ieD" style="position:absolute;height:2px;width:2px;font-size:2px;background:'+dCol+'"></div>'); document.write('</div></div>'); document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < h; i++) document.write('<div id="ieH" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>'); document.write('</div></div>'); document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < m; i++) document.write('<div id="ieM" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>'); document.write('</div></div>') document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i=0; i < s; i++) document.write('<div id="ieS" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>'); document.write('</div></div>') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.
上一篇:狡猾的按钮特效
下一篇:日期选择器
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
第二梯队也PK:当1号店“遇上”京东手机节
电话用户9月实名制:运营商监管受质疑
乐视今日临时停牌 受广电酝酿新规消息影响
想玩P2P?几个您必须知道的潜规则
虚拟运营商们更像三大运营商的“二道贩子”
迪信通神秘免费服务揭谜底:充电宝免费带回家
快递企业征收“份子钱” 成全了谁 苦了谁?
苹果音乐效劳新战略:与唱片商停止流媒体协作
看病也能用支付宝了 马云的又一盘大棋
推荐阅读
更多>
一大波智能路由器正在袭来:小米、360、极路由大PK
空气污染器市场乱象丛生 选购需慎重
微软很“捉急”:补贴Win8 重加末尾按钮
9158屌丝逆袭 从在线“夜总会”转型KTV
支付宝曝平安破绽:转账信息被谷歌抓取
携程整合去哪儿陷入僵局 欲联手老对手艺龙
微软张亚勤趋势判断:未来三十年属于物理化互联网
三星起诉LG在冰箱广告中玷污其企业笼统
优酷土豆兼并一年:依然处于烧钱形状
国美在线叫板京东:李俊涛底气在哪?
打车软件竞争白热化:有冷兵器时代意味
淘宝公布新规:升级售假卖家惩罚力度
从3G牌照发放看中国4G规划效果
迅雷再次在美提交IPO申请
苹果20年以来首次发债 融资170亿美元
小米打响手机价格战 为米3铺路或另有所图
云储存有多远:跨过数据安全问题即可到达
联想国庆完成收购IBM x86服务器
黑狐病毒疯传播 电脑管家首推 专杀工具
IT时代周刊总编辑曹健:投资人刘志硕印象记