How can I create this nav animation on scroll?


I managed to change the position of my navigation menu to ‘sticky’ and animate the background colour from blue to black when scrolling down. I also got the menu to return back to blue when scrolling back up.

What I want to know is, how can I achieve this menu -

Pretty similar to what I achieved, however, no matter how far down the page you are, the nav menu background colour only returns back to its original state when you are at the top of the page. How can I achieve this?


Here is my public share link: LINK
(how to access public share link)

Hi exactly what I’m doing now set a While Page Scrolling with at 0% what you want the state to be at the top and the other state at 1%.

best regards Viktor

Cool ok! Thanks Viktor i’ll give it a try later on and let you know how I get on.

Thanks Viktor, your solution worked perfect.