爱易网
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 浏览次数:20398 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!-- 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 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:一段实用的图片滚动显示代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
“宽带中国”计划已正式上升为国家战略
iSuppli:上网本将于2015年退出市场
估值增长9.8% 阿里IPO前市值达2450亿美元
从WPS到office365,中国企业能否赶超美国?
电话用户9月实名制:运营商监管受质疑
马云寄厚望于物流 “菜鸟”行情暂难持续
Twitter收购印度手机营销公司ZipDial
高通拼抢国际芯片市场 联发科海外拓展难安心
墨迹也要做硬件,工具类应用如何“变异”的
推荐阅读
更多>
京东联席董事长赵国庆上市前夕离职
玩游戏式的趣味戒烟App:Kwit
联通丹东公司一高管造假套出手机变卖被判刑7年
刘强东:京东上市融资用于开拓三至六线城市
电话用户9月实名制:运营商监管受质疑
小米2S试水高端化 纯“性价比”玩法已成过去式
PC迎9年来出货量新低 平板电脑渐成主流
国美苏宁线上首度正面PK 京东列席4月电商战
中移动“重启”自有品牌手机成败难料
Docker Desktop 4.11 发布:支持虚拟桌面、Mac 权限更改和新扩展
百度吴恩达:图像和音视频搜索是人工智能新方向
墨迹也要做硬件,工具类应用如何“变异”的
世界杯让耐克阿迪大打出手 谁能劈开用户大脑?
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
黑狐病毒疯传播 电脑管家首推 专杀工具
支付宝全面封杀比特币:充值码淘宝店或遭封禁
中国电信内外受困 去电信化思绪待改
“论文查重”网店一月收入竟过百万
苹果优势逐渐丧失 传即将推出廉价iPhone
微软张亚勤趋势判断:未来三十年属于物理化互联网