一个页面中引用多个Swiper,可以给每个容器加上ID或Class区分,要保留默认的类名swiper-container。
html
<div class="swiper-container" id="swiper1">....</div>
<div class="swiper-container" id="swiper2">....</div>
js
var swiper1 = new Swiper('#swiper1');
var swiper2 = new Swiper('#swiper2');