An element that uses Position:sticky;
is positioned based on the user's scroll position.
A sticky element toggles between relative and fixed, depending on the scroll position.
It maintains the position until a given offset point is met in the viewport. After the offset position is met, the element sticks in place.
Source:W3 Schools
Top comments (0)