N
N
Nikita Fedorov2019-05-07 15:02:20
css
Nikita Fedorov, 2019-05-07 15:02:20

Appearance of a fixed header when scrolling the page?

Guys, hello) I stumbled upon the site and would like to know how to make the same "animation" of the appearance of the cap
I would be happy to help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stransens, 2019-05-07
@NikitaFedorov

using js to track page scroll. on a certain number of pixels (100 for example) you assign some class to the header. you prescribe the necessary styles to this class, including position: fixed. when scrolling by a smaller number of pixels, you remove the class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question