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. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 动画效果

jquery一款css3制作的图片动画特效代码

浏览器显示区域为容器,多张图片从左上角滚动而出,各自随机浮动,很NICE!
  动画效果
 7738  0

纯css3鼠标hover触发抖动特效

鼠标悬停在元素上,触发元素左右抖动动画特效!
  动画效果
 1720  0

CSS3创建的像素块霸王龙行走动画特效

一款快速行走的霸王龙动画效果,纯css3实现,有点类似于谷歌浏览器的断网小游戏。
  动画效果
 8877  0

jquery文本文字自定义闪烁变色动画特效代码

一款轻量级文本文字闪烁动画插件,可针对文本文字自定义的眨眼/闪光动画,可设置闪烁颜色、闪烁次数。
  动画效果
 6928  0

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

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