爱易网
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 浏览次数:20394 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!-- 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 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:一段实用的图片滚动显示代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
微信今天大面积崩溃 腾讯:因光缆施工被挖断
传4G牌照国庆节前后发放 TD-LTE制式优先
TD是完成中国梦的一个契机
诺基亚再缩阵线 封锁上海旗舰店全力蜕变
电信资费新政:三巨头压力大 短期降价仍有争议
扎克伯格华裔妻子首度亮相电视节目畅谈情史
同程旅游融资后变土豪 如何烧钱占领市场?
戴尔新CEO名单曝光:惠普甲骨文高管在列
一大波智能路由器正在袭来:小米、360、极路由大PK
推荐阅读
更多>
华为变阵:任正非调整三大业务布局
英特尔VS苹果:移动芯片大战
摩托罗拉中国区将再裁员 助力公司变身
华为美国推出电商网站 发售Mate 2LTE版
如家撤离同程内情:祸起反水OTA“联盟”?
小米发明的“低价抢购”模式还能管用多久?
评论:马云的成功建立在什么基础上很值得怀疑
中电信率先推移动转售业务 中下旬批量上市
网友爆料称微软雇水军宣传主机Xbox One
HTC曝出特大丑闻:高管诈骗+商业间谍
HTC手机为何一败再败?效果出在供应链
诺基亚再缩阵线 封锁上海旗舰店全力蜕变
全球五大电信设备商业绩:华为净利居首
亚马逊Fire Phone:请别拿我跟苹果三星比
刘强东:京东上市融资用于开拓三至六线城市
英特尔技术高管离任 电视业务或受影响
2019双12阿里云老用户怎么参加拼团活动 老用户拼团方法
苹果股价突破100美元大关:投资者看好iPhone 6
聚美向左,唯品向右,怎能耐得住高跟和红唇的诱惑!
华为野心布局未来:投资研发5G对赌1毫秒连接