Solution: Use swiper to automatically rotate pictures, when the content in the swiper is dragged, the automatic rotation will not continue

After using swiper:

var mySwiper = new Swiper('.banner .swiper-container', {
    autoplay: 3000,
    loop: true,
    pagination: '.swiper-pagination',
    autoplayDisableOnInteraction : false
})
The solution is to set this parameter: parameter introduction given by the official website of autoplayDisableOnInteraction : whether to disable  autoplay after the user operates the swiper . Defaults to true : stop. If set to false , the automatic switching will not stop after the user operates the swiper, and autoplay will be restarted every time. Operations include touch , drag, click pagination , etc.






Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324935978&siteId=291194637