K
K
kryamk2021-06-15 19:18:56
JavaScript
kryamk, 2021-06-15 19:18:56

How to make such a slider when scrolling?

This site has a vertical scroll slider.
Is there any ready-made solution or just write it yourself?
And if you can throw in an approximate logic yourself?
I so understand by means of an observer I address the necessary section. I turn off the scroll at the body, add a scroll where the pictures are. I use an observer to catch the appearance of images in order to add the active class to the text and points of the slider.
Although there is somehow still position: sticky involved

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
targyn, 2021-06-15
@targyn

I suppose that when scrolling to the right place through js, position sticky is put in the heading with the text below, despite the fact that the page scrolls further and such an effect is created.
An element that has position: sticky applied remains fixed in the document until a certain threshold is reached, and then it will stick to that threshold after scrolling.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question