How to smoothly show the menu when scrolling up?

  • 0
    As when scrolling up, smoothly bring up the menu from top to bottom, when scrolling up, smoothly move up.
    and start executing js code, when scrolling more than 400px
    Initially, the menu is not fixed.
    JavaScript Anonymous, May 27, 2020

  • 1 Answers
  • 0
    If the menu is not fixed, you can use transform (CSS) - the position of the menu will change (visually) in the necessary positions, but there will be no effect on adjacent elements. Plus, do a transition (CSS) on transform, and you get smooth animation of the menu. Can be done in JS through CSS classes.

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!