爱易网
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 浏览次数:20235 次
以下是程序代码
<!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的特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
金山毒霸安全中心: XP退役后首个高危漏洞来了
不提老罗,不说情怀,仅从十四个投诉问题入手谈锤子手机
618首日看京东阿里不同策略,鹿死谁手?
中移动“重启”自有品牌手机成败难料
创维冲击500亿梦想:转型硬件和内容供应商
虚拟运营商前路迷茫 业界建议发力车联网
百度“全网寻人”面前的互联网信息枢纽价值
马云自称在美国曾被绑票
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
推荐阅读
更多>
评论:马云的成功建立在什么基础上很值得怀疑
小微型IDC云化趋势加剧 云计算未来或现终极模式
看,网络文学今日之繁盛;忆,纯真去哪了?
谁说黑莓没救?他们在悄悄地深耕企业级市场,在这个领域,苹果三星算什么,他们远远不是黑莓的对手
雷军会做赔钱生意?迅雷跌破发行价 市值仅7亿美元
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
苹果音乐效劳新战略:与唱片商停止流媒体协作
QQ空间与微信龟兔赛跑,商业生态链陷入死循环
说说这一个月的赌球输了多少
快播灭了,还有西瓜:视频网站的灰色江湖还在
成本效益全兼顾 混合云市场前景显现
中兴引进黑莓三个核心团队
开个房刷个卡全世界都知道个人隐私成公开秘密
AMD Q1净亏1.46亿美元 转战SOC拥抱ARM求变
团购网站存活率仅18.6% 剩余缺乏千家
阿里巴巴上市后雅虎将面临更大的业绩压力
工信部或本月17日向联通电信颁发FDD牌照
搜狐前副总编何毅加盟乐视 任车联网公司CEO
网曝富士康500万iphone遭退货是确证的事
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人