I’m looking for help with making the navigation bar appear after scrolling past the first section (100vh).
The navbar should stay sticky for the following sections.
Additionally, I need assistance in ensuring its responsiveness.
Your response to my query is greatly appreciated.
3
Answers
Certainly! I can help you with making a navigation bar appear after scrolling past the first section and ensuring its responsiveness. Here’s an example implementation using HTML, CSS, and JavaScript:
HTML :
CSS :
JS :
8-10 lines of javascript will do that for you
Lets make the structure first
Here
<div id="top"></div>
will help us to reach page topsome CSS that will make the nav behave like you wanted. Appear and hide.
some javascript that will add the visible class to the nav conditionally
You can run the code bellow ↙
Just a little bit of JS to ensure the nav shows up after scrolling and you have a nav bar that works perfectly