position: sticky is a hybrid: an element behaves like relative (stays in normal flow) until it scrolls to a threshold you specify, then behaves like fixed (sticks in place) — but only while its containing block is still on screen.
{
: sticky;
: ;
}
