素材牛VIP会员

jQuery焦点轮播缩略图可动画切换,可点击放大

 所属分类:网页特效-焦点图/幻灯片

 浏览:1754次  下载:4次  评论:0次  更新时间:2017-03-14
jQuery焦点轮播缩略图可动画切换,可点击放大兼容IE6
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!   充值积分   充值会员   更多说明»
素材描述:jQuery支持缩略图点击切换大图,左右按钮可控制轮播方向。在商品详情页里经常会用到,大图下方的缩略图,最好是压缩过的,不然会影响网页打开速度。

详细介绍

使用方法:

引入jQuery库文件、插件JS文件

<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/pic_tab.js"></script>

插件初始化、参数配置

<script type="text/javascript">
jq('#demo1').banqh({
	box:"#demo1",//总框架
	pic:"#ban_pic1",//大图框架
	pnum:"#ban_num1",//小图框架
	prev_btn:"#prev_btn1",//小图左箭头
	next_btn:"#next_btn1",//小图右箭头
	pop_prev:"#prev2",//弹出框左箭头
	pop_next:"#next2",//弹出框右箭头
	prev:"#prev1",//大图左箭头
	next:"#next1",//大图右箭头
	pop_div:"#demo2",//弹出框框架
	pop_pic:"#ban_pic2",//弹出框图片框架
	pop_xx:".pop_up_xx",//关闭弹出框按钮
	mhc:".mhc",//朦灰层
	autoplay:true,//是否自动播放
	interTime:5000,//图片自动切换间隔
	delayTime:400,//切换一张图片时间
	pop_delayTime:400,//弹出框切换一张图片时间
	order:0,//当前显示的图片(从0开始)
	picdire:true,//大图滚动方向(true为水平方向滚动)
	mindire:true,//小图滚动方向(true为水平方向滚动)
	min_picnum:5,//小图显示数量
	pop_up:true//大图是否有弹出框
})
</script>

加入CSS样式

.ban{ width:500px; height:600px; position:relative; overflow:hidden;margin:40px auto 0 auto;}
.ban2{ width:500px; height:500px; position:relative; overflow:hidden;}
.ban2 ul{ position:absolute; left:0; top:0;}
.ban2 ul li{ width:500px; height:500px;}
.prev{ float:left; cursor:pointer;}
.num{ height:82px;overflow:hidden; width:430px; position:relative;float:left;}
.min_pic{ padding-top:10px; width:500px;}
.num ul{ position:absolute; left:0; top:0;}
.num ul li{ width:80px; height:80px; margin-right:5px; padding:1px;}
.num ul li.on{ border:1px solid red; padding:0;}
.prev_btn1{ width:16px; text-align:center; height:18px; margin-top:40px; margin-right:20px; cursor:pointer; float:left;}
.next_btn1{  width:16px; text-align:center; height:18px; margin-top:40px;cursor:pointer;float:right;}
.prev1{ position:absolute; top:220px; left:20px; width:28px; height:51px;z-index:9;cursor:pointer;}
.next1{ position:absolute; top:220px; right:20px; width:28px; height:51px;z-index:9;cursor:pointer;}
.mhc{ background:#000; width:100%;opacity:0.5;-moz-opacity:0.5;filter:alpha(Opacity=50); position:absolute; left:0; top:0; display:none;}
.pop_up{ width:500px; height:500px; padding:10px; background:#fff; position:fixed; -position:absolute; left:50%; top:50%; margin-left:-255px; margin-top:-255px; display:none; z-index:99;}
.pop_up_xx{ width:40px; height:40px; position:absolute; top:-40px; right:0; cursor:pointer;}
.pop_up2{ width:500px; height:500px; position:relative; overflow:hidden;}
.pop_up2{ width:500px; height:500px; position:relative; overflow:hidden; float:left;}
.pop_up2 ul{ position:absolute; left:0; top:0;}
.pop_up2 ul li{ width:500px; height:500px; float:left;}

HTML结构

<!-- 代码begin -->
<div class="ban" id="demo1">
	<div class="ban2" id="ban_pic1">
		<div class="prev1" id="prev1"><img src="images/index_tab_l.png" width="28" height="51"  alt=""></div>
		<div class="next1" id="next1"><img src="images/index_tab_r.png" width="28" height="51"  alt=""></div>
		<ul>
			<li><a href="javascript:;"><img src="images/b1.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b2.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b3.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b4.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b5.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b1.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b2.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b3.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b4.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b5.jpg" width="500" height="500" alt=""></a></li>
		</ul>
	</div>
	<div class="min_pic">
		<div class="prev_btn1" id="prev_btn1"><img src="images/feel3.png" width="9" height="18"  alt=""></div>
		<div class="num clearfix" id="ban_num1">
			<ul>
				<li><a href="javascript:;"><img src="images/s1.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s2.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s3.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s4.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s5.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s1.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s2.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s3.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s4.jpg" width="80" height="80" alt=""></a></li>
				<li><a href="javascript:;"><img src="images/s5.jpg" width="80" height="80" alt=""></a></li>
			</ul>
		</div>
		<div class="next_btn1" id="next_btn1"><img src="images/feel4.png" width="9" height="18"  alt=""></div>
	</div>
</div>
<div class="mhc"></div>
<div class="pop_up" id="demo2">
	<div class="pop_up_xx"><img src="images/chacha3.png" width="40" height="40"  alt=""></div>
	<div class="pop_up2" id="ban_pic2">
		<div class="prev1" id="prev2"><img src="images/index_tab_l.png" width="28" height="51"  alt=""></div>
		<div class="next1" id="next2"><img src="images/index_tab_r.png" width="28" height="51"  alt=""></div>
		<ul>
			<li><a href="javascript:;"><img src="images/b1.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b2.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b3.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b4.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b5.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b1.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b2.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b3.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b4.jpg" width="500" height="500" alt=""></a></li>
			<li><a href="javascript:;"><img src="images/b5.jpg" width="500" height="500" alt=""></a></li>
		</ul>
	</div>
</div>

相关素材 - 焦点图/幻灯片

讨论这个素材(0)回答他人问题或分享使用心得会奖励牛币

〒_〒 居然一个评论都没有……

 文明上网,理性发言!   😉 阿里云幸运券,戳我领取
我的牛币余额:0 已下载次数:4
所需牛币:1 开始下载

牛币获取:签到、评论、充值    » 在线充值(10牛币=1元)