Sticky elements are predominantly used for keeping something shown on the screen throughout scrolling. As cool as that is, we can also hide elements in the same way!
Here’s a typical (um) sticky situation:
See the Pen position:sticky (CSS) by Preethi Sam (@rpsthecoder) on CodePen.
Sticky elements (position: sticky;) are very similar to fixed elements ( position: fixed;) in that they both maintain their position on the screen, even as the user scrolls up …
The post Creating sliding effects using sticky positioning appeared first on CSS-Tricks.