多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Swiper Scrollbar使用方法 * * * * * 1. 如需使用Swiper的滚动条首先加载Scrollbar插件 js和css ~~~ <head> <link rel="stylesheet" href="css/idangerous.swiper.css"> <link rel="stylesheet" href="css/idangerous.swiper.scrollbar.css"> <script src="js/idangerous.swiper-2.x.min.js"></script> <script src="js/idangerous.swiper.scrollbar-1.x.js"></script> </head> ~~~ * * * * * 2.加入HTML ~~~ <div class="swiper-container"> //其他HTML内容 </div> <div class="swiper-scrollbar"></div> ~~~ * * * * * 3.设置CSS样式。 ~~~ <style> .swiper-scrollbar { height:10px; margin:20px auto; width: 880px; ... 滚动条的样式... } .swiper-scrollbar-drag { ... 滚动条中可拖动块的样式... } </style> ~~~ * * * * * 4.插入相应代码 ~~~ var mySwiper = new Swiper('.swiper-container',{ //其他设置 scrollbar: { container : '.swiper-scrollbar', draggable : true, hide: true, snapOnRelease: true } }); ~~~