Parallax Slider 是一个动感是否酷炫的立体幻灯片插件,它充分利用了视觉差原理,当图片滑动时,背后的大幅背景也会随着移动,非常有视觉冲击力。感觉真的不错...
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
首先我们在#pxs_container放置大图和对应的缩略图
<div id="pxs_container" class="pxs_container">
<div class="pxs_bg">
<div class="pxs_bg1">
</div>
<div class="pxs_bg2">
</div>
<div class="pxs_bg3">
</div>
</div>
<div class="pxs_loading">
Loading images...
</div>
<div class="pxs_slider_wrapper">
<ul class="pxs_slider">
<li>
<img src="images/1.jpg" alt="First Image" />
</li>
<li>
<img src="images/2.jpg" alt="Second Image" />
</li>
<li>
<img src="images/3.jpg" alt="Third Image" />
</li>
<li>
<img src="images/4.jpg" alt="Forth Image" />
</li>
<li>
<img src="images/5.jpg" alt="Fifth Image" />
</li>
<li>
<img src="images/6.jpg" alt="Sixth Image" />
</li>
</ul>
<div class="pxs_navigation">
<span class="pxs_next">
</span>
<span class="pxs_prev">
</span>
</div>
<ul class="pxs_thumbnails">
<li>
<img src="images/thumbs/1.jpg" alt="First Image" />
</li>
<li>
<img src="images/thumbs/2.jpg" alt="Second Image" />
</li>
<li>
<img src="images/thumbs/3.jpg" alt="Third Image" />
</li>
<li>
<img src="images/thumbs/4.jpg" alt="Forth Image" />
</li>
<li>
<img src="images/thumbs/5.jpg" alt="Fifth Image" />
</li>
<li>
<img src="images/thumbs/6.jpg" alt="Sixth Image" />
</li>
</ul>
</div>
</div>
引入jQuery库、easing动画和parallaxSlider插件
<link rel="stylesheet" href="css/parallaxSlider.css">
<script src="js/jquery.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/parallaxSlider.js"></script>
调用parallaxSlider
$(function() {
var $pxs_container = $('#pxs_container');
$pxs_container.parallaxSlider();
});
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群