sticky
is nice because the element stays in position, until the page scrolls down. When the element is about to be hidden, it’s actually always kept visible.
I made this example:
Lessons in this unit:
0: | Introduction |
1: | Relative positioning |
2: | Absolute positioning |
3: | Fixed positioning |
4: | ▶︎ Sticky positioning |