Navbar scroll into view with background color changing


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:


You can fix this by rearranging the positioning of the nav background colour div that you’ve added.

If you drag the nav bg color block inside the navbar itself like so:


Then set the positioning settings to the following:

Hi, Thanks for your reply!!
The interaction works well on the top page! :slight_smile:
But it sometimes doesn’t work…

I set my navbar as a symbol and put it to different pages.
However, in other pages, the interaction doesn’t work.
for example,

Could you kindly give me some advice to solve this problem?

Best regards,