爱易网
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 浏览次数:20149 次
以下是程序代码
<!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的特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
亚马逊落户上海自贸区:美国货直邮中国
用友软件股价逆势下跌 再融资方案现曙光
淘宝公布新规:升级售假卖家惩罚力度
苹果30亿美元收购Beats
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
移动联通回应税率改革:短期内收入利润将大减
Line风靡亚洲,在北美却进展缓慢
微信收费形式三选一 腾讯或变身运营商
工商下月将整治手机市场
推荐阅读
更多>
网络旅行游记被曝插入"软广告" 个别人士月入数万
中电信国际漫游费下调85% 世界杯上网28元/天
机器人进一步取代人类:将进军白领任务
快播灭了,还有西瓜:视频网站的灰色江湖还在
华为变阵:任正非调整三大业务布局
高通拼抢国际芯片市场 联发科海外拓展难安心
从百度世界大会看大数据
黑狐病毒疯传播 电脑管家首推 专杀工具
用友软件股价逆势下跌 再融资方案现曙光
英特尔IDF峰会启示:释放移动互联的信号
国美电商开打价钱战 牟贵先言行矛盾受质疑
牟贵先挂帅 国美在线“价钱战”昔日开打
二代 iPad Air将配备2GB内存?为同屏多任务做准备
苹果优势逐渐丧失 传即将推出廉价iPhone
“合聚变”来了 UC优视确认并入阿里巴巴
打车App就是下一个团购骗局!?
国内首个大数据系列指数今日发布
中国电信内外受困 去电信化思绪待改
传陌陌或12月赴美IPO 估值约30亿美元
传4G牌照国庆节前后发放 TD-LTE制式优先