今天分享一个有点延迟效果的焦点图轮播。
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
HTML
<div id="js_banner" class="fx_banner">
<ul id="js_banner_img" class="fx_banner_img clear">
<li style="background:#cfd0ef">
<div class="fx_banner_inner fx_grid_c1">
<div class="child child0" data-z="1">
<img src="images/0.jpg" alt="misfit shine">
</div>
<div class="child" data-z="2" style="left:0;top:0;">
<img src="images/0_1.png" alt="">
</div>
<div class="child" data-z="3" style="left:495px;top:0;">
<img src="images/0_2.png" alt="">
</div>
</div>
<a href="#" class="fx_banner_link">
<span class="hide">
去购买
</span>
</a>
</li>
<li style="background:#fe5769">
<div class="fx_banner_inner fx_grid_c1">
<div class="child child0" data-z="1">
<img src="images/1.jpg" alt="latin">
</div>
<div class="child" data-z="2" style="left:0;top:0;">
<img src="images/1_1.png" alt="">
</div>
<div class="child" data-z="3" style="left:495px;top:0;">
<img src="images/1_2.png" alt="">
</div>
</div>
<a href="#" class="fx_banner_link">
<span class="hide">
去购买
</span>
</a>
</li>
</ul>
</div>
引入jQuery库、css和js
<link rel="stylesheet" href="css/index.css" type="text/css" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/tab.js"></script>
调用tab插件
$(function() {
var $window = $(window),
window_width = $window.width();
$('#js_banner, #js_banner_img li').width(window_width);
new $.Tab({
target: $('#js_banner_img li'),
effect: 'slide3d',
animateTime: 1000,
stay: 3500,
autoPlay: true,
merge: true,
prevBtn: $('#js_banner_pre'),
nextBtn: $('#js_banner_next')
});
});
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群