爱易网
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 浏览次数:20385 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!-- TWO STEPS TO INSTALL BALL DROP: 1. 复制本代码到你的HTML文档的HEAD标记内 2. 将最后一段代码放入HTML文档的BODY标记内 --> <!-- STEP ONE: 复制本代码到你的HTML文档的HEAD标记内 --> <HEAD> <SCRIPT LANGUAGE="JavaScript1.2"> <!-- Begin function BrowserCheck() { var b = navigator.appName; if (b == "Netscape") this.b = "NS"; else if (b == "Microsoft Internet Explorer") this.b = "IE"; else this.b = b; this.v = parseInt(navigator.appVersion); this.NS = (this.b == "NS" && this.v>=4); this.NS4 = (this.b == "NS" && this.v == 4); this.NS5 = (this.b == "NS" && this.v == 5); this.IE = (this.b == "IE" && this.v>=4); this.IE4 = (navigator.userAgent.indexOf('MSIE 4')>0); this.IE5 = (navigator.userAgent.indexOf('MSIE 5')>0); if (this.IE5 || this.NS5) this.VER5 = true; if (this.IE4 || this.NS4) this.VER4 = true; this.OLD = (! this.VER5 && ! this.VER4) ? true : false; this.min = (this.NS||this.IE); } is = new BrowserCheck(); // End --> </script> </HEAD> <!-- STEP TWO: 将最后一段代码放入HTML文档的BODY标记内 --> <BODY> <center> Click anywhere to start script <div id="staticBall" style="position:relative;visibility:visible"> <img src="images/1602.gif" height=30 width=30 alt="Static ball" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/> </div> </center> <div id="ball" style="visibility:hidden; position:absolute; left:100; top:10; height:34; width:34"> <img src="http://www.aiyiweb.com/images/face/image21.gif" height=30 width=30 alt="Bouncing ball" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/> </div> <script language="Javascript1.2"> <!-- Begin iter = 0; setId = 0; down = true; up = false; bouncingBall = (is.VER5) ? document.getElementById("ball").style : (is.NS) ? document.layers["ball"] : document.all["ball"].style; stillBall = (is.VER5) ? document.getElementById("staticBall").style : (is.NS) ? document.layers["staticBall"] : document.all["staticBall"].style; winH = (is.NS) ? window.innerHeight - 55 : document.body.offsetHeight - 55; document.onmouseup = buttonUp; if (is.NS4) document.captureEvents(Event.MOUSEUP); function buttonUp(e) { if ( ((is.NS) ? e.which : event.button) != 1) return true; if (setId != 0) clearInterval(setId); bouncingBall.visibility="visible"; stillBall.visibility="hidden"; bouncingBall.left = (is.NS) ? e.pageX - 15 : event.offsetX - 15; bouncingBall.top = (is.NS) ? e.pageY - 15 : event.offsetY - 15; iter = 0; setId = setInterval("generateGravity()", 20); return true; } function generateGravity() { if ((parseInt(bouncingBall.top)+iter < winH) && down) { bouncingBall.top = parseInt(bouncingBall.top) + iter; iter++; return; } else { if ((parseInt(bouncingBall.top)< winH) && down) { bouncingBall.top = winH + 5; return; } down = false; up = true; if (iter < 0 && parseInt(bouncingBall.top) > winH) { clearInterval(setId); bouncingBall.visibility = "hidden"; stillBall.visibility="visible"; setId = 0; } if (parseInt(bouncingBall.top) > 0 && up && iter >= 0) { bouncingBall.top = parseInt(bouncingBall.top) - iter; iter--; if (iter%3 == 0) iter--; return; } down = true; up = false; } } // End --> </script> <!-- Script Size: 3.46 KB --> <a href="http://www.aiyiweb.com/js/">欢迎访问爱易网JS特效</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:一段实用的图片滚动显示代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
探析APP移动营销发扬实效的微妙
蓝宝石PK大猩猩玻璃:作为屏幕谁更有优势?
易迅大众点评缩水执行“七天后悔权”被约谈
眼球识别技术EyeVerify融资600万美元 360参投
腾讯微信昨晚再现大规模故障 多地受到影响
美国政府关门可能影响去哪儿等公司IPO
国美痛批网购七宗罪 用短暂盈利输了未来
苹果收购Beats交易或将延期尚需解决5大问题
杨元庆去年总薪酬1.33亿元
推荐阅读
更多>
去看看外面的世界吧!别窝里斗了,中国在线旅游商们
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
“宽带中国”计划已正式上升为国家战略
微软的云服务显示出他们将自我进化
百度“全网寻人”面前的互联网信息枢纽价值
二代 iPad Air将配备2GB内存?为同屏多任务做准备
银联布局二维码支付,“擦边球”生态不能自救
搜狐与奇虎360或结盟对抗BAT
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
英特尔VS苹果:移动芯片大战
第二梯队也PK:当1号店“遇上”京东手机节
百度对糯米来说到底意味着什么?
任正非:喜马拉雅山的水为什么不能流入亚马逊河?
小米移动芯片:英伟达退出,终会加强与联发科合作
京东联席董事长赵国庆上市前夕离职
中电信率先推移动转售业务 中下旬批量上市
网曝富士康500万iphone遭退货是确证的事
三大运营商合建铁塔公司真相:未涉及电信业重组
国美电商开打价钱战 牟贵先言行矛盾受质疑
曝阿里巴巴一怀孕员工过劳死 加班情况引争议