In CSS, position: sticky
enables an element to display with a position: static
behaviour (ie. it adopts its default position within the document flow) until it reaches a certain scroll position, after which it adopts position: fixed
behaviour.
So... does that mean we cannot use position: sticky
on an element which requires a normal behaviour of position: absolute
?
Context:
I have an out-of-flow element which occupies a position towards the top-left corner of the viewport. After an inch or two of scrolling, the element hits the top of the viewport and, ideally, I'd like it not to carry on disappearing at that point.