Well, on medium’s and post there is a menu bar at the top which gets scrolled down when the user scrolls down the page but it gets back up once the user scrolls up. How can this effect be achieved?
For reference purpose here is a link to one the posts on medium:
Here the green menu bar at the top is not sticky but it appears whenever the user scrolls up the page.