Answer the question
In order to leave comments, you need to log in
A slider nested within a slider. How to make css not spread to nested?
Good day Samurai! I use slick.js https://github.com/kenwheeler/slick One slider is nested inside another. The structure is like this:
<div class="SliderPanel">
<div class="Slide">
<div class="Onlink">
<div class="Rand"></div>
<div class="Rand"></div>
</div>
</div>
<div class="Slide">
</div>
<div class="Slide">
</div>
<div>
.SliderPanel .slick-slide {
display: block;
opacity: .1;
transition-delay: 0s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-out;
}
.SliderPanel .slick-current {
display: block;
opacity: 1;
transition-delay: 0.3s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-in;
}
Answer the question
In order to leave comments, you need to log in
This is how it should work
.SliderPanel > .slick-list >.slick-track > .slick-slide {
display: block;
opacity: .1;
transition-delay: 0s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-out;
}
.SliderPanel > .slick-list > .slick-track > .slick-current {
display: block;
opacity: 1;
transition-delay: 0.3s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-in;
}
use direct subordination
.SliderPanel > .slick-slide {
display: block;
opacity: .1;
transition-delay: 0s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-out;
}
.SliderPanel > .slick-current {
display: block;
opacity: 1;
transition-delay: 0.3s;
transition-duration: 0.2s;
transition-property: opacity;
transition-timing-function: ease-in;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question