Shrink a Navbar on Scroll! - Easy JavaScript Effect

preview_player
Показать описание
Do you have a large navbar that's taking up a lot of space on your page? In this video, we'll teach you how to shrink your navbar using JavaScript.

This shrinking navbar tutorial is easy to follow, and you'll be able to apply it to your own web projects in no time. After watching this video, you'll be able to shrink your navbar to the perfect size without any Photoshop or coding required!

Happy Coding!
Рекомендации по теме
Комментарии
Автор

There are so many ways to write JS to do the same thing. As a noob I am glad you write and explain it like this without all kind of shorthands and weird "one-line-code-constructions" and the like. I actually understood it first time watching, lol. Big thanks for that!

SnakesRaven
Автор

when I added styles (but to the body in my case) it appeared in the inspector but that part where you log the scrollY value didn't appear on my screen
EDIT: I see now that it's supposed to be in the head even when nav is in the body, but still didnt work for me :( It might be to the styling of other elements in my navbar or I don't know..

grygi
welcome to shbcf.ru