Stuck with Slick Carousel “Center mode”

后端 未结 3 1020
滥情空心
滥情空心 2021-02-14 22:30

I\'ve been toying around with Slick carousel for a fair few hours, and really can\'t get my head around how to implement the \"center mode\" that\'s on the Slick website: http:/

3条回答
  •  星月不相逢
    2021-02-14 23:16

    1. You have 2 sliders defined (center, single-item) while in your html only "single-item" has slides. The "center" slide is wrapping the "single-item" and holds only one child div.
    2. The class single-item was written with spaces making it 3 different classes "single" "-" (although I don't think this one is a class) and "item".

    If you intended to make the "single-item" slide to show in centerMode then this is the right code:

    
    < script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js" >  
    
     
    
    
    
    
    
    
    

    1

    2

    3

    4

    5

    6

提交回复
热议问题