爱易网
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 浏览次数:20380 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!-- 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 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:一段实用的图片滚动显示代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
迅雷高管解读财报:收购快盘可快速融入小米
新闻早8点》Facebook失手发布Snapchat类应用
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
特斯拉将获上海免费牌照 充电桩面临双重标准
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
微软张亚勤趋势判断:未来三十年属于物理化互联网
支付宝全面封杀比特币:充值码淘宝店或遭封禁
美国电影协会在华起诉迅雷侵权 要求赔偿并道歉
特斯拉技术专利开放,要革自己的命?
推荐阅读
更多>
微软不会被颠覆
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
OPPO Find7体验测 Find7综测
美国政府关门可能影响去哪儿等公司IPO
170号码扎堆上市:手机话费私人定制时代到来?
携程艺龙联手死磕同程 价钱烽烟蔓延至机票
挂号网高管团体离任 或因投资人失掉决计
iPhone 6 Plus要召回是谣言
苹果多色彩!葫芦里究竟卖的什么药
三星维修新规:Galaxy S4主板进水也收费修
“组合拳”怎么打 拆解小米新玩法
传360周鸿祎曾试图阻止百度收购91无线
三问刘强东:京东为何近来火气这么大?
诺基亚仍是第二大手机商:功用机有利可图
史玉柱谈创业:5大建议 失败的教训最真实
英特尔IDF峰会启示:释放移动互联的信号
京东进驻微信一级入口或影响自身战略布局
墨迹也要做硬件,工具类应用如何“变异”的
京东微信入口战略能否助力618大促创流量巅峰
戴尔正告继续上市存风险 称黑石伊坎方案有缺乏