Swiper轮播冲突

___

2020-11-3 18:25:18 ,

解决方法

加一层父元素。注意标红部分。

<div class="lb1">
    <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide swipers"><a href="" class="lbck"><img class="lbmg "src="images/lba1.jpg" alt=""></a></div>
      <div class="swiper-slide swipers"><a href="" class="lbck"><img class="lbmg "src="images/lba2.jpg" alt=""></a></div>
    </div>
    <div class="pagination"></div>
  </div>
  <script>
  var mySwiper = new Swiper('.lb1 .swiper-container',{
    loop: true,
    autoplay: 3000,
    pagination: '.lb1 .pagination',
    paginationClickable: true  
  })
  </script>
</div>
<div class="lb2">
    <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide swipers"><a href="" class="lbck"><img class="lbmg "src="images/lba1.jpg" alt=""></a></div>
      <div class="swiper-slide swipers"><a href="" class="lbck"><img class="lbmg "src="images/lba2.jpg" alt=""></a></div>
    </div>
    <div class="pagination"></div>
  </div>
  <script>
  var mySwiper = new Swiper('.lb2 .swiper-container',{
    loop: true,
    autoplay: 3000,
    pagination: '.lb2 .pagination',
    paginationClickable: true  
  })
  </script>
</div>

完美解决!