- 如需使用Swiper的滚动条首先加载Scrollbar插件 js和css
<head> <link rel="stylesheet" href="css/idangerous.swiper.css"> <link rel="stylesheet" href="css/idangerous.swiper.scrollbar.css">
* * * * *
2.加入HTML
//其他HTML内容
* * * * *
3.设置CSS样式。
* * * * *
4.插入相应代码
var mySwiper = new Swiper(".swiper-container",{
//其他设置
scrollbar: {
container : ".swiper-scrollbar",
draggable : true,
hide: true,
snapOnRelease: true
}
});