1、swiper每页上都有动画,当翻到此页时动画才会显示,但是会遇到翻页翻到一半并没有完全翻过去,导致此页的动画已经隐藏,而下一页的动画还没有执行,所以会出现画面空白的问题。

解决方法是增加onTouchEnd的回调

                var mySwiper = new Swiper ('.swiper-container', {
			   direction : 'vertical',
			   pagination: '.swiper-pagination',
			   mousewheelControl : true,
			   loop:true,
			   onInit: function(swiper){
				   swiperAnimateCache(swiper);
				   swiperAnimate(swiper);
			   },
			   onSlideChangeEnd: function(swiper){
				   swiperAnimate(swiper);
			   },
			   onTouchEnd: function (swiper) {                  
                                   swiperAnimate(swiper);
                           }	  
		   });

 

相关文章:

  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-01-05
猜你喜欢
  • 2021-08-25
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-04-13
  • 2021-11-19
相关资源
相似解决方案