有关滑动的插件大多数情况下使用的都是swiper,简单、实用。最近在项目中遇到正常显示的是可以滑动的缩略图相册(本人实用swiper实现的),但是点击之后还需显示大图可以滑动,在此我又使用了baguetteBox插件(可能有更好的插件,时间关系就用了这个,当然自己会写的话肯定最好),用法很简单:
<div class='baguetteBoxOne'>
<a href="../img/2.jpg"><img src="../img/2.jpg"></a>
<a href="../img/1.jpg"><img src="../img/1.jpg"></a>
</div>
<link rel="stylesheet" href="./bootstrap/css/baguetteBox.css">
<script src="./bootstrap/css/baguetteBox.js"></script>
<script>
window.onload = function() {
baguetteBox.run('.baguetteBoxOne');
};
</script>
插件下载地址:http://pan.baidu.com/s/1pL6iBlL
密码:cb8p