The top
offset allows us
to control the element's
position from the top edge
of the viewing screen
or
the top edge of its container
element.
In this example,
when we keep scrolling down
and
reach the orange div
,
the position sticky
and
top
offset come into effect.
We can see that the div
does
not scroll down like the other content.
It stays fixed at 100px from the
top as specified in the top offset.
Change the value of the top offset
from 100px to anything else
and
notice the difference.