jquery鼠标悬停触发图片抖动插件

所属分类: 网页特效-动画效果    2024-12-13 02:24:15

jquery鼠标悬停触发图片抖动插件 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery鼠标悬停触发图片抖动插件(共10个文件)

    • index.html

使用方法

$.fn.extend({ShakeBorder: function(opciones) {
					var ShakeBorder=this;
					theClassShake=$(ShakeBorder).attr('class');
					
					
					defaults = {shake:true,border:true}
					var opciones = $.extend({}, defaults, opciones);
					
					if(opciones.shake){
						shakecode ='<style>@-webkit-keyframes spaceboots {0%   { -webkit-transform: translate(2px, 1px)   rotate(0deg); }10%  { -webkit-transform: translate(-1px, -2px) rotate(-1deg); }	20%  { -webkit-transform: translate(-3px, 0px)  rotate(1deg); }';
						shakecode=shakecode+'30%  { -webkit-transform: translate(0px, 2px)   rotate(0deg); }';
						shakecode=shakecode+'40%  { -webkit-transform: translate(1px, -1px)  rotate(1deg); }';
						shakecode=shakecode+'50%  { -webkit-transform: translate(-1px, 1px)  rotate(-1deg); }';
						shakecode=shakecode+'60%  { -webkit-transform: translate(-3px, -2px)  rotate(0deg); }';
						shakecode=shakecode+'70%  { -webkit-transform: translate(2px, 1px)   rotate(-1deg); }';
						shakecode=shakecode+'80%  { -webkit-transform: translate(-1px, -2px) rotate(1deg); }';
						shakecode=shakecode+'90%  { -webkit-transform: translate(2px, -1px)   rotate(0deg); }';
						shakecode=shakecode+'100% { -webkit-transform: translate(1px, -2px)  rotate(-1deg); }}';
						shakecode=shakecode+"."+theClassShake+":hover,."+theClassShake+":focus,."+theClassShake+":hover,."+theClassShake+":focus {-webkit-animation-name: 'spaceboots';-webkit-animation-duration: 0.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count: infinite;	-webkit-animation-timing-function: linear;}";
						shakecode=shakecode+'.'+theClassShake+' {display:block;	position:relative;}';
						shakecode=shakecode+'.'+theClassShake+'.inline {display:inline-block;}</style>';
						
						
						shakecode ='<style>.'+theClassShake+' {display:block;position:relative;}';
						shakecode=shakecode+'.'+theClassShake+':hover {-webkit-animation-name: shakeEffect;';
						shakecode=shakecode+'-moz-animation-name: shakeEffect;';
						shakecode=shakecode+'animation-name: shakeEffect;';
						shakecode=shakecode+'-webkit-animation-duration: 0.8s;';
						shakecode=shakecode+'-moz-animation-duration: 0.8s;'
						shakecode=shakecode+'animation-duration: 0.8s;';
						shakecode=shakecode+'-webkit-transform-origin:50% 50%;';
						shakecode=shakecode+'-moz-transform-origin:50% 50%;';
			shakecode=shakecode+'transform-origin:50% 50%;';
			shakecode=shakecode+'-webkit-animation-iteration-count: infinite;';
			shakecode=shakecode+'-moz-animation-iteration-count: infinite;';
			shakecode=shakecode+'animation-iteration-count: infinite;';
			shakecode=shakecode+'-webkit-animation-timing-function: linear;';
			shakecode=shakecode+'-moz-animation-timing-function: linear;';
			shakecode=shakecode+'animation-timing-function: linear;';
			shakecode=shakecode+'}';
			
shakecode=shakecode+theClassShake+'</style>';						
			$(ShakeBorder).before(shakecode);					
			}
				if(opciones.border){
						shakecode='';
						shakecode=shakecode+"<style>."+theClassShake+":hover img{opacity:1;filter: alpha(opacity = 100);}";
						shakecode=shakecode+"."+theClassShake+":hover .Ot1{border-color:#0088EA;box-shadow:0 0 10px #0285E2;}"
						shakecode=shakecode+"."+theClassShake+":hover .outer2{opacity:1;filter: alpha(opacity = 100);box-shadow:0 0 20px #8EB9FF;} </style>"
						$(ShakeBorder).before(shakecode);
				}
				$(ShakeBorder).each(function( index ) {
					thesrc=$(this).attr('src');
					attralt=$(this).attr('alt');
					alt='';
					if (typeof attralt !== typeof undefined && attralt !== false) {{ alt=attralt; }}
					var theCode='';
					theCode=theCode+'<div class=" HoverShakeImage '+theClassShake+'">';
					theCode=theCode+'<div class="Ot1 crclu"></div>';
					theCode=theCode+'<div class="outer2 crclu"></div>';
					theCode=theCode+'<figure>';
					theCode=theCode+'<img src="'+thesrc+'" />';
					theCode=theCode+'<figcaption class="caption">'+alt+'</figcaption>';
					theCode=theCode+'</figure>';
					theCode=theCode+'</div>';
					$(this).replaceWith( theCode );
				});
	}
});

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

CSS3创建的蜡烛燃烧火焰动画特效代码

这是一款使用了CSS3生成的蜡烛火焰特效,蜡烛的火苗左右摆动,并且发出的灯光带有微微闪烁,非常的逼真。
  动画效果
 3808  0

一款带CSS3多彩纽带动画的登录表单特效

一款多彩纽带背景动画特效代码,多个不规则绳子循环旋转,而且鼠标悬停变色发光,该表单包含字段:用户名、密码字段和登录按钮。
  动画效果
 5922  0

jquery动态数字翻滚计数到指定数字的动画特效

一款动态数字跳动计数动画插件, 这个功能实现了页面到达可视区域,实现动态数字翻滚计数到指定数字的文字特效。
  动画效果
 91306  0

CSS3带日夜切换动画的城市生活图片

一款很灵动的白天夜晚切换动画特效,鼠标点击右下角的切换按钮,可触发月亮下落、太阳升起动画效果。
  动画效果
 8621  0

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

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