爱易网
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 浏览次数:20150 次
以下是程序代码
<!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的特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎
小米年度发布会遭围剿!多款新品难阻品牌危机
黑莓高管:黑莓能作为家“小众公司”活下来
微博启动自媒体计划 粉丝+收入双激励是亮点
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
三星石墨烯制备技术获突破
中移动落马高管盘点:广东移动成反腐重地
阿里物流搭上邮政:京东,我们在终点等你!
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
推荐阅读
更多>
全球五大电信设备商业绩:华为净利居首
网络旅行游记被曝插入"软广告" 个别人士月入数万
中国首台比特币ATM登陆上海 可购买不可兑换现钞
易迅大众点评缩水执行“七天后悔权”被约谈
Facebook财报前瞻:投资者仍信心不足
FDD牌照短期不会发放 联通电信暗自提速建网
苹果售后生态链乱象:供需失衡价钱不一
中移动财报外的"五座大山":运营商沦为走秀陪衬
亚马逊落户上海自贸区:美国货直邮中国
广东移动高层受调查 中移动或现更大反腐风暴
国美在线叫板京东:李俊涛底气在哪?
工商总局开查电商“七日退货”
诺基亚依托规模效应 猛攻国际市场空白
华为坚持不上市究竟为何?不差钱也不想冒风险
摩托罗拉移动裁员关闭德州Moto X手机工厂
富士康人事故骚动方寸 不惜血本下注电商
史上最严电话实名制9月实行 三大难题待解
阿里入股虎嗅:媒体的脊梁弯了?未必!
组建铁塔公司倒逼运营商改革 或加速4G网建设
网易云音乐能否为丁磊拿到移动互联网门票?