爱易网
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特效
仿animate效果的jQ风格特效
仿animate效果的jQ风格特效
日期:2014-05-18 浏览次数:20209 次
以下是程序代码
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> self.moveTo(0,0) self.resizeTo(screen.availWidth,screen.availHeight) onresize = function () {return false;} </script><title>Super Animate</title> <meta name="Author" content="hongru.chen" /> <script type="text/javascript"> /* =========== animate js ============ */ /* @author:hongru.chen */ /* =================================== */ if (typeof HR == 'undefined' || !HR) HR = { extend : function (destination, source, override) { if (override === undefined) override = true; for (var property in source) { if (override || !(property in destination)) { destination[property] = source[property]; } } return destination; } }; (function () { var Tween = { // 以下算子的参数分别表示: t:运行时间,b:开始量,c:总变化量,d:总时间 Linear: function(t,b,c,d){ return c*t/d + b; }, Quad: { easeIn: function(t,b,c,d){ return c*(t/=d)*t + b; }, easeOut: function(t,b,c,d){ return -c *(t/=d)*(t-2) + b; }, easeInOut: function(t,b,c,d){ if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; } }, Cubic: { easeIn: function(t,b,c,d){ return c*(t/=d)*t*t + b; }, easeOut: function(t,b,c,d){ return c*((t=t/d-1)*t*t + 1) + b; }, easeInOut: function(t,b,c,d){ if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; } }, Quart: { easeIn: function(t,b,c,d){ return c*(t/=d)*t*t*t + b; }, easeOut: function(t,b,c,d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOut: function(t,b,c,d){ if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; } }, Quint: { easeIn: function(t,b,c,d){ return c*(t/=d)*t*t*t*t + b; }, easeOut: function(t,b,c,d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOut: function(t,b,c,d){ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; } }, Sine: { easeIn: function(t,b,c,d){ return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOut: function(t,b,c,d){ return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOut: function(t,b,c,d){ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; } }, Expo: { easeIn: function(t,b,c,d){ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOut: function(t,b,c,d){ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOut: function(t,b,c,d){ if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; } }, Circ: { easeIn: function(t,b,c,d){ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOut: function(t,b,c,d){ return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOut: function(t,b,c,d){ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; } }, Elastic: { easeIn: function(t,b,c,d,a,p){ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (!a || a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOut: function(t,b,c,d,a,p){ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (!a || a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a);
上一篇:狡猾的按钮特效
下一篇:用CSS使图片上下左右都绝对居中于DIV的特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
虚拟运营商流量不清零吸引用户 盈利待明
微软提示XP只剩365天寿命:用户被绑架?
乐视28日发布手机进展 LeUI系统Mobile版或曝光
八位知名设计师评iOS7:新鲜但复杂
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
智能手机:中国手机市场最受关注十五款产品清点
打车App就是下一个团购骗局!?
中国电信内外受困 去电信化思绪待改
推荐阅读
更多>
工商总局开查电商“七日退货”
中移动将推出多项4G资费新政
评论:阿里为什么不试着收购一家香港媒体呢
小微型IDC云化趋势加剧 云计算未来或现终极模式
小米盗版有理激怒乐视:提500部盗播证据猛追打
从旗下三大业务BG发展看华为的过去现在和未来
赴美开店,阿里11Main准备好了吗?
小米2S试水高端化 纯“性价比”玩法已成过去式
Line风靡亚洲,在北美却进展缓慢
创维冲击500亿梦想:转型硬件和内容供应商
中移动推动感地带3G网聊卡 火拼微信沃卡
快递企业征收“份子钱” 成全了谁 苦了谁?
纸媒深探版权蓝海抗衡互联网的时机到来了
搜狐与奇虎360或结盟对抗BAT
微软张亚勤趋势判断:未来三十年属于物理化互联网
郭美美事件推手被抓 “秦火火”拷问网络底线
分析称iPhone 6明年初发布 屏幕变为4.8吋
网络视频的几大趋势将成视频玩家躲不开的发力点
支付宝被曝严重破绽 隐私平安再受质疑
从WPS到office365,中国企业能否赶超美国?