Use position: sticky; on elements. When a page is scrolled, a sticky element sticks to a given position on the screen within its parent container, credit to CSS-TRICKS.
See the Pen position:sticky (CSS) by Preethi Sam (@rpsthecoder) on CodePen.
Use position: sticky; on elements. When a page is scrolled, a sticky element sticks to a given position on the screen within its parent container, credit to CSS-TRICKS.
See the Pen position:sticky (CSS) by Preethi Sam (@rpsthecoder) on CodePen.
Comments
Post a Comment