slick slider - css transition infinite loop bug

后端 未结 6 1515
傲寒
傲寒 2021-02-04 04:59

I\'ve got a slider set up using slick slider. When using the next and previous buttons, the item comes in to view with a nice transition. The problem I\'m having is that when it

6条回答
  •  悲哀的现实
    2021-02-04 05:34

    Infinity set to true, CenterMode set to false add effect to current just css

    /* slide when not active*/ 
    .slick-slide[aria-hidden="true"]:not(.slick-cloned) ~ .slick-cloned[aria-hidden="true"] {
    
    }
    
    /* slide when active (when play last to first) */ 
    .slick-slide[aria-hidden="true"]:not([tabindex="-1"]) + .slick-cloned[aria-hidden="true"]  {
    
    }
    /* slide when active (when play first to last) */ 
    .slick-slide[aria-hidden="true"] + .slick-cloned[aria-hidden="true"] {
    
    }
    

提交回复
热议问题