Answer the question
In order to leave comments, you need to log in
How to add the effect of the appearance of new and disappearance of old elements of the slider?
1. You need to set the slides to red when they appear 2.
You need to set the
slides
to blue when they disappear
https://codepen.io/FedorT/pen/wOapyy
Answer the question
In order to leave comments, you need to log in
I tried, in this case everything works. Thank you!
In general, I thought about something more universal, so that the number of active slides changes depending on the viewport, the slidesToShow parameter. For example, 10, 7, 4, 1. This is where the ambush comes in.
It seems to me that everything is quite simple here.
.non-active { background-color: blue; }
.active { background-color: red; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question