S
S
Snatch082019-06-26 20:06:06
css
Snatch08, 2019-06-26 20:06:06

How to set css style of active slide on one of multiple slick carousels?

Good day Sensei! I use several slick.js https://github.com/kenwheeler/slick on my site and apply the following css styles for active and inactive slide:

.slick-slide{
  display: block;
  opacity: .1;
  transition-delay: 0s;
  transition-duration: 0.2s;
  transition-property: opacity;
  transition-timing-function: ease-out;
  background-color: green; 
}

/*.slick-slide.slick-active{*/
.slick-slide.slick-current{
  display: block;	
  opacity: 1;
  transition-delay: 0.3s;
  transition-duration: 0.2s;
  transition-property: opacity;
  transition-timing-function: ease-in;
  background-color: yellow; 	
}
The property applies to all slick carousels, how to apply to specific ones?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2019-06-26
@Snatch08

Adds a class to the desired slick.
. slick-required slick-current{
...
}
Right?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question