//初始化swiper
                var swiper = new Swiper('.swiper-container', {
                    pagination: '.swiper-pagination',
                    nextButton: '.swiper-button-next',
                    prevButton: '.swiper-button-prev',
                    slidesPerView: 1,
                    paginationClickable: true,
                    spaceBetween: 30,
                    loop: true,//循环
                    autoplay : 5000,//默认播放
                    observer: true, //修改swiper自己或子元素时,自动初始化swiper,主要是这两行
                    observeParents: true //修改swiper的父元素时,自动初始化swiper
                });

 

相关文章:

  • 2022-02-09
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-04-11
  • 2022-03-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-10-26
  • 2021-11-21
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案