爱易网
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 浏览次数:20391 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!-- 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 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:一段实用的图片滚动显示代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
罗永浩工匠形象坍塌,锤子产能再跳水逃离用户超两成
看病也能用支付宝了 马云的又一盘大棋
微软最后的救命稻草Win 8份额继续上升
唯品会股价飙升 引天猫当当京东进军闪购
中移动业绩增长趋缓 目光转向海外市场
代工厂生活危机:“富士康们”何去何从?
搜狐前副总编何毅加盟乐视 任车联网公司CEO
八位知名设计师评iOS7:新鲜但复杂
美剧讲硅谷创业者:远不及现实荒诞?
推荐阅读
更多>
运营商补贴减少 国内通信业拐点逼近
小米发明的“低价抢购”模式还能管用多久?
杨元庆去年总薪酬1.33亿元
互联网金融一周年:余额宝最接地气,比特币最作死
传诺基亚Lumia928下月推出 将与iPhone5看齐
支付宝钱包支持医保移动缴费 广州成首个试点
三星石墨烯制备技术获突破
网络音乐非片面收费 高晓松时间表难完成
联发科享用价钱战 专利难以摆脱高通
微软谷歌高层访韩面前:忌惮三星的崛起
诺基亚称不会更名“微软移动” 5月还将发布新品
同样的背景,罗永浩和雷军到底有什么不同?
电信业营改增今起实施 运营商短期利润骤降
富士康欲用机器人产iPhone 6
微信收费形式三选一 腾讯或变身运营商
聚美向左,唯品向右,怎能耐得住高跟和红唇的诱惑!
HTC手机为何一败再败?效果出在供应链
中电信率先推移动转售业务 中下旬批量上市
揭秘:阿里巴巴“无人认领”的三成股权都归谁
全球五大电信设备商业绩:华为净利居首