1. 程式人生 > >swiper如何禁止使用者滑動

swiper如何禁止使用者滑動

禁止使用者滑動,只需要在最外層新增class  “swiper-no-swiping”

<div class="swiper-container swiper-no-swiping">
    <div class="swiper-wrapper">
        <div class="swiper-slide">Slide 1</div>
        <div class="swiper-slide">Slide 2</div>
        <div class="swiper-slide
">Slide 3</div> </div> <!-- 如果需要分頁器 --> <div class="swiper-pagination"></div> <!-- 如果需要導航按鈕 --> <div class="swiper-button-prev"></div> <div class="swiper-button-next"></div> <!-- 如果需要滾動條 --> <div class
="swiper-scrollbar"></div> </div>