I made a navbar with interaction.
When scrolling down the navbar will disappear, and when scrolling up it shows again.
However, when it scrolling up again, I’d like to make the navbar background color from transparent to black. I tried to add a div for background color, but it doesn’t really work.
Can anyone kindly help me with this problem?
The ideal Navbar is like the below website.
But when scrolling up the background color shows up.
Here is my public share link: