jQuery实现悬停动画HoverEx插件



78 309 104



特效描述:jQuery实现 悬停动画 HoverEx插件,jQuery实现悬停动画HoverEx插件

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/demo.css" />
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/hoverex-all.css" />
<link rel="stylesheet" href="css/templates.css" />
<link rel="stylesheet" href="css/demo.css" />
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/hoverex-all.css" />
<link rel="stylesheet" href="css/templates.css" />

2. 引入JS

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.hoverex.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.hoverex.js"></script>

3. HTML代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body  >
	<div class="header cf a_slow fadeInDown">
		<div class="header-inner">
			<a href="#" class="logo">HoverEx</a> 
			<ul>
				<li><a href="http://51qianduan.com/" class="active">Templates / Demo</a></li>
				<li><a href="http://51qianduan.com/">All Animations</a></li>
				<li><a href="http://51qianduan.com/" style="text-decoration:line-through">Documentation</a></li>
			</ul>
		</div>
	</div>
	<div class="page a_slow elasticInLeft" >
		<!--template 1-->
		<div class="title cf"><h3>Template 1</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl1">
					<img src="img/1.jpg" alt="" />
					<div class="he-view">
						<div class="sider-right a0"  data-animate="fadeInRight">
							<a href="#" class="a1 zoom" data-animate="fadeInRight"></a>
							<a href="#" class="a2 undo" data-animate="fadeInRight"></a>
							<a href="#" class="a3 check" data-animate="fadeInRight"></a>
							<a href="#" class="a4 close" data-animate="fadeInRight"></a>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl1">
					<img src="img/2.jpg" alt="" />
					<div class="he-view">
						<div class="sider-right a0"  data-animate="fadeInRight">
							<a href="#" class="a1 zoom" data-animate="rotateIn"></a>
							<a href="#" class="a2 undo" data-animate="rotateIn"></a>
							<a href="#" class="a3 check" data-animate="rotateIn"></a>
							<a href="#" class="a4 close" data-animate="rotateIn"></a>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl1">
					<img src="img/3.jpg" alt="" />
					<div class="he-view">
						<div class="sider-right a0"  data-animate="fadeInRight">
							<a href="#" class="a1 zoom" data-animate="pendulum"></a>
							<a href="#" class="a1 undo" data-animate="pendulum"></a>
							<a href="#" class="a1 check" data-animate="pendulum"></a>
							<a href="#" class="a1 close" data-animate="pendulum"></a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--template 2-->
		<div class="title cf"><h3>Template 2</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl2">
					<img src="img/4.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<div class="center-bar">
								<a href="#" class="twitter a0" data-animate="elasticInDown"></a>
								<a href="#" class="facebook a1" data-animate="elasticInDown"></a>
								<a href="#" class="google a2" data-animate="elasticInDown"></a>
								<a href="#" class="in a3" data-animate="elasticInDown"></a>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl2">
					<img src="img/5.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<div class="center-bar">
								<a href="#" class="twitter a0" data-animate="fadeInUp"></a>
								<a href="#" class="facebook a1" data-animate="fadeInUp"></a>
								<a href="#" class="google a2" data-animate="fadeInUp"></a>
								<a href="#" class="in a3" data-animate="fadeInUp"></a>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl2">
					<img src="img/6.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<div class="center-bar">
								<a href="#" class="twitter a0" data-animate="rotateInLeft"></a>
								<a href="#" class="facebook a1" data-animate="rotateInLeft"></a>
								<a href="#" class="google a2" data-animate="rotateInLeft"></a>
								<a href="#" class="in a3" data-animate="rotateInLeft"></a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--template 3-->
		<div class="title cf"><h3>Template 3</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl3">
					<img src="img/10.jpg" alt="" />
					<div class="he-view">
						<div class="info-bottom a0" data-animate="fadeInUp">
							HoverEx - jQuery Hover Animation Plugin
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl3">
					<img src="img/11.jpg" alt="" />
					<div class="he-view">
						<div class="info-top a0" data-animate="fadeInDown">
							HoverEx - jQuery Hover Animation Plugin
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl3">
					<img src="img/12.jpg" alt="" />
					<div class="he-view">
						<div class="info-fly a0" data-animate="flipInV">
							HoverEx - jQuery Hover Animation Plugin
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--template 4-->
		<div class="title cf"><h3>Template 4</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl4">
					<img src="img/7.jpg" alt="" />
					<div class="he-view">
						<div class="bg">
							<div class="a0" data-animate="fadeInDown"></div><div class="a0" data-animate="fadeInUp"></div><div class="a0" data-animate="fadeInDown"></div><div class="a0" data-animate="fadeInUp"></div><div class="a0" data-animate="fadeInDown"></div>
						</div>
						<div class="content">
							<h3 class="info-title a2" data-animate="fadeInDown">HoverEx - jQuery Plugin</h3>
							<div class="detail a2" data-animate="fadeInUp">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text.</div>
							<a href="#" class="more a2" data-animate="fadeInRight">View Detail</a>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl4">
					<img src="img/8.jpg" alt="" />
					<div class="he-view">
						<div class="bg">
							<div class="a0" data-animate="fadeIn"></div><div class="a1" data-animate="fadeIn"></div><div class="a2" data-animate="fadeIn"></div><div class="a3" data-animate="fadeIn"></div><div class="a4" data-animate="fadeIn"></div>
						</div>
						<div class="content">
							<h3 class="info-title a3" data-animate="rotateInLeft">HoverEx - jQuery Plugin</h3>
							<div class="detail a4" data-animate="rotateInLeft">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text.</div>
							<a href="#" class="more a5" data-animate="fadeInUp">View Detail</a>
						</div>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl4">
					<img src="img/9.jpg" alt="" />
					<div class="he-view">
						<div class="bg">
							<div class="a0" data-animate="fadeInUp"></div><div class="a1" data-animate="fadeInUp"></div><div class="a2" data-animate="fadeInUp"></div><div class="a3" data-animate="fadeInUp"></div><div class="a4" data-animate="fadeInUp"></div>
						</div>
						<div class="content">
							<h3 class="info-title a3" data-animate="fadeInLeft">HoverEx - jQuery Plugin</h3>
							<div class="detail a4" data-animate="fadeInRight">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text.</div>
							<a href="#" class="more a5" data-animate="fadeInRight">View Detail</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--template 5-->
		<div class="title cf"><h3>Template 5</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl5">
					<img src="img/13.jpg" alt="" />
					<div class="he-view">
						<a href="#" class="buy a0" data-animate="jellyInDown">Buy Now</a>
						<a class="price a1" data-animate="jellyInDown" href="#">$45</a>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl5">
					<img src="img/14.jpg" alt="" />
					<div class="he-view">
						<a href="#" class="buy a0" data-animate="rotateInLeft">Buy Now</a>
						<a class="price a1" data-animate="rotateInLeft" href="#">$45</a>
					</div>
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl5">
					<img src="img/15.jpg" alt="" />
					<div class="he-view">
						<a href="#" class="buy a0" data-animate="bounceInDown">Buy Now</a>
						<a class="price a2" data-animate="bounceInDown" href="#">$45</a>
					</div>
				</div>
			</div>
		</div>
		<!--template 6-->
		<div class="title cf"><h3>Template 6</h3></div>
		<div class="demowrap cf">
			<div class="box">
				<div class="he-wrap tpl6">
					<img src="img/1.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<h3 class="a1" data-animate="fadeInDown">HoverEx Plugin</h3>
							<a href="#" class="btn a2" data-animate="rotateInLeft"><span>564</span>Likes</a>
							<a href="#" class="btn a2" data-animate="rotateInRight"><span>115</span>Dislikes</a>
						</div>
					</div>			
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl6">
					<img src="img/2.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<h3 class="a1" data-animate="fadeInDown">HoverEx Plugin</h3>
							<a href="#" class="btn a2" data-animate="bounceInLeft"><span>564</span>Likes</a>
							<a href="#" class="btn a2" data-animate="bounceInRight"><span>115</span>Dislikes</a>
						</div>
					</div>			
				</div>
			</div>
			<div class="box">
				<div class="he-wrap tpl6">
					<img src="img/3.jpg" alt="" />
					<div class="he-view">
						<div class="bg a0"  data-animate="fadeIn">
							<h3 class="a1" data-animate="fadeInDown">HoverEx Plugin</h3>
							<a href="#" class="btn a2" data-animate="zoomIn"><span>564</span>Likes</a>
							<a href="#" class="btn a2" data-animate="zoomIn"><span>115</span>Dislikes</a>
						</div>
					</div>			
				</div>
			</div> 
		</div>
		<!-- zoom demo -->
		<div class="title cf"><h3>Inline Zoom Demo</h3></div>
		<div class="cf">
			<div class="box">
				<div class="he-wrap">
					<img src="img/1.jpg" alt="" />
					<div class="he-zoom" data-zoom="1.5" data-zoomrange="1,4" data-zoomstep="0.5">
						<img src="img/1-l.jpg" alt="" />
					</div>
				</div>
			</div>
			<div class="info">
				<strong>Image zoom effect</strong><br />
				Features:
				<ul>
					<li>Support mousewheel to control zoom state!</li>
					<li>InitZoomState: the init zoom state,can be set a number or 'auto'.</li>
					<li>ZoomRange : the min/max zoom state of the image.default 1X to 4X.</li>
					<li>ZoomStep : zoom state change step.default 0.5.</li>
				</ul>
			</div>
		</div>
		<div class="title cf"><h3>Dynamic Zoom Demo</h3></div>
		<div class="cf">
			<div class="cf" style="float:left; width:370px">
			<div class="box">
				<div class="he-wrap" id="zoomblock">
					<img src="img/1.jpg" alt="" />
					<div class="he-zoom" data-zoom="1.5" data-zoomrange="1,3" data-zoomstep="0.5">
						<img src="img/1-l.jpg" alt="" />
					</div>
				</div>
			</div>
			<ul class="thumb-list">
				<li><img src="img/1.jpg" alt="" data-large="img/1-l.jpg" /></li>
				<li><img src="img/2.jpg" alt="" data-large="img/2-l.jpg" /></li>
				<li><img src="img/3.jpg" alt="" data-large="img/3-l.jpg" /></li>
			</ul>
			</div>
			<script type="text/javascript">
				$(function(){
					$(".thumb-list img").click(function(){
						var src = $(this).attr("src");
						var large = $(this).data("large");
						$("#zoomblock>img").attr("src",src);
						$("#zoomblock .he-zoom>img").attr("src",large);
					});
				});
			</script>
			<div class="info" style="width:670px">
				<strong>Work with Dynamic Zoom </strong><br />
				It is just easy to use it for dynamic zoom.You need only to chang the original image and the large image src attr.
				For example:
				<pre>$(function(){
	$(".thumb-list img").click(function(){
		var src = $(this).attr("src");
		var large = $(this).data("large");
		$("#zoomblock>img").attr("src",src);
		$("#zoomblock .he-zoom>img").attr("src",large);
	});
});
</pre>
			</div>
		</div>
		<!-- slider demo -->
		<div class="title cf" style="margin-top:20px"><h3>Slider Demo random animations</h3></div>
		<div class="box">
			<div class="he-wrap">
				<div class="he-sliders" >
					<img class="a0" src="img/1.jpg" alt="" />
					<img class="a0" src="img/2.jpg" alt="" />
					<img class="a0" src="img/3.jpg" alt="" />
				</div>
				<div class="he-view" >
					<span class="he-pre a0" data-animate="fadeInLeft"></span>
					<span class="he-next a0" data-animate="fadeInRight"></span>
				</div>
			</div>
		</div>
		<div class="info">
				<strong>Support Mouse wheel to control the slider!</strong><br />
				Features:
				<ul>
					<li>Over 36 animate can be use. </li>
					<li>Mouse wheel control support.</li>
					<li>Easy to customize the pre and next button show animation</li>
					<li>Can specify the animation or random.</li>
				</ul>
			</div>
	</div>
<div style="text-align:center;clear:both">
</div>
</body>
</html>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 图片拖动 图片放大镜 图片叠加 图片翻转旋转 图片延迟加载 图片淡出淡进 图片全屏 图片头像上传 二维码 滑动滑过 图片广告 图片放大缩小 加载动画 html5图片动画 带缩略图的幻灯片 地图 图片滚动 图片滑动 图片切换 图片收缩展开 旋转木马 图片轮播 自动滚动图片轮播 图标导航菜单 背景切换 滑动星星打分 手风琴 html5弹窗动画 html5动画h5动画 图表 图片 头像截图 其他更多 html5按钮动画 鼠标悬停 滑动选项卡切换 图片相册 分享 html5悬停动画

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到