jquery基于Clockz创建的CSS3逐帧动画特效插件

所属分类: 网页特效-动画效果    2023-09-19 02:42:10

jquery基于Clockz创建的CSS3逐帧动画特效插件 ie兼容6
反馈问题  查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery基于Clockz创建的CSS3逐帧动画特效插件(共7个文件)

    • index.html

使用方法

			var phone1 = {
				name: 'phone1',
				loop: true,
				frames: [
					{ duration: 2000 },
					{ properties: { left: 768 }, duration: 800, easing: 'swing' },
					{ properties: { top: 200 }, duration: 3000, easing: 'swing' },
					{ properties: { perspective: '100px', rotateX: '180deg'}, type: 'transit', duration: 2000 },
					{ duration: 2000 },
					{ properties: { top: 10 }, duration: 3000, easing: 'swing' },
					{ properties: { perspective: '100px', rotateX: '0deg'}, type: 'transit', duration: 2000 }
				]
			};
			var phone2 = {
				name: 'phone2',
				loop: true,
				frames: [
					{ duration: 2000 },
					{ properties: { left: 410 }, duration: 800, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { rotate: '+=30' }, type: 'transit', duration: 70, easing: 'swing' },
					{ properties: { top: 600 }, duration: 2000, easing: 'swing' },
					{ duration: 1000 },
					{ properties: { top: 10 }, duration: 2000, easing: 'swing' }
				]
			};
			var phone3 = {
				name: 'phone3',
				loop: true,
				loopStart: 2,
				frames: [
					{ duration: 2000 },
					{ properties: { left: 1111 }, duration: 800, easing: 'swing' },
					{ properties: { top: 600 }, duration: 1000, easing: 'swing' },
					{ properties: { top: 10 }, duration: 1000, easing: 'swing' }
				]
			};
			var phone4 = {
				name: 'phone4',
				loop: true,
				frames: [
					{ duration: 5000 },
					{ properties: { left: 60, top: 25 }, duration: 1500, easing: 'swing' },
					{ properties: { opacity: 1 }, duration: 700, easing: 'swing' },
					{ properties: { opacity: 0 }, duration: 700, easing: 'swing' },
					{ properties: { opacity: 1 }, duration: 700, easing: 'swing' },
					{ properties: { opacity: 0 }, duration: 700, easing: 'swing' },
					{ properties: { opacity: 1 }, duration: 700, easing: 'swing' },
					{ properties: { left: -400, top: 300 }, duration: 1500, easing: 'swing' },
				]
			};
			$(function(){

				var stopped = false;
				var clockz = new Clockz();

				$('#stop').click(function(e) {
					stopped = !stopped;
					if (stopped) {
						$(this).html('Play');
						clockz.stopAll();
					}
					else {
						$(this).html('Stop');
						clockz.playAll();
					}
				});

				clockz.playHook = function(node, frame, callback) {

					var duration = frame.duration || 400;
					var properties = frame.properties || null;
					if (properties) {
						var jnode = $(node);
						if (!jnode) {
							this.error( 'playHook(): node is invalid.' );
							return;
						}
						var type = frame.type || 'jquery';
						var easing = frame.easing || 'swing';
						switch (type) {
				            case 'jquery':
				                $(node).animate(properties, duration, easing, callback);
				                break;
				            case 'transit':
				                $(node).transition($.extend({
									duration: duration,
									easing: easing,
									complete: callback
				                }, properties));
				                break;
				        }
					}
					else {
						setTimeout(callback, duration);
					}
			    };

				clockz.create('.phone1', phone1);
				clockz.create('.phone2', phone2);
				clockz.create('.phone3', phone3);
				clockz.create('.phone4', phone4);
				clockz.playAll();

			});

站长提示:
1. 平台上所有素材资源,需注册登录会员方能正常下载。
2. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励20K币
3. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
4. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 动画效果

轻量级点击按钮抖动文本文字动画特效代码

一款轻量级点击抖动动画插件,鼠标点击按钮触发指定文字实现平滑的抖动动画。
  动画效果
 248  

纯CSS实现的水平文本文字新闻列表滚动条特效

一个水平新闻滚动条动画效果。新闻滚动条显示从右向左滚动的新闻列表,鼠标悬停于列表标题文字上即可暂停滚动。
  动画效果
 259  

jquery页面加载完成时触发文字动画特效

可指定使用特效的div标签文字,文字从小变大的整个动画过程!
  动画效果
 183  

js创建的丰富的多彩动画特效代码

一款鼠标点击弹出动画特效代码,卡片有各种颜色,并在鼠标点击后触发显示扩展动画特效。
  动画效果
 140  

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论