Back to Documentation
Header-nav States

The floating navbar animation is used to help users navigate pages after scrolling. 

There will be two navbars on the Webflow element panel. 

Html code in the <head> will control how “Floatnav” animates. 

The code declares a var  y_scroll_pos to record the y axis offset. If  y_scroll_pos is greater than scroll_pos_test, now 150px, the “Floatnav” will be given a subclass “active”. 

The styles of the “active” class will move the “Floatnav” from outside the page to its desired position.