'Style centerPadding in slick slider
How can I style the centerPadding in the slick.js slider? I want set the opacity of the padding, but not all items in the track.
$('.ourgroup-carousel').slick({
infinite: true,
slidesToShow: 4,
slidesToScroll: 1,
arrows: true,
centerMode: true,
centerPadding:'80px',
});
Solution 1:[1]
There's a css class ".slick-center" that references the current centered div. Feel free to jazz up the center div as you wish by putting that in your own stylesheet.
Solution 2:[2]
i know this is a really old question, but i stumbled across the same problem lately, my fix was to use following css
.slick-slide[aria-hidden="true"] {
opacity: 0.5;
}
it will in fact style all invisible slides, but as they are not shown it doesn't matter.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Psymøn |
| Solution 2 | Marc-Oliver |
