Slick Carousel - centerMode without excess slides

Viewed 4417

enter image description here

I want to make a slide (using Slick.js), based on the picture, I want to make centerMode:true and focusOnSelect:true...

but the problem is there will be two excess slide (left and right). How do I remove them?

I already tried to set centerMode to false. There will be no excess slide, but the selected slide will be on the most left. So it is important for me to set the centerMode to true, because I want to make the selected slide in center.

Sorry for my bad english.

Any help will be appreciated.

Thanks

2 Answers

I have a simpler solution. Work only in centerMode.

.slick-slide {
  opacity: 0;
}
.slick-slide.slick-center {
  opacity: 1;
}
Related