一、下载js包:http://download.csdn.net/detail/dancheng1/9842288
二、使用方法:
(1)HTML结构
<div id="slider" class="swipe">
<div class="swipe-wrap">
<div></div>
<div></div>
<div></div>
</div>
</div>
(2)样式代码
.swipe {
overflow: hidden;
visibility: hidden;
position: relative;
}
.swipe-wrap {
overflow: hidden;
position: relative;
}
.swipe-wrap > figure {
float: left;
width: 100%;
position: relative;
}
(3)设置js绑定参数
var slider = Swipe(document.getElementById('slider'), {
…………
…………
});
swipe官网:http://bradbirdsall.com/