Home  >  Article  >  Web Front-end  >  JavaScript changes the position value to fix the menu after scrolling to the top_javascript skills

JavaScript changes the position value to fix the menu after scrolling to the top_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:43:181111browse

Many websites now have such an effect. When the page scrolls to a certain height, the menu bar will be fixed at the top of the page. In fact, it is to change the value of position.
html code:

Copy code The code is as follows: