Bada
Bada's Coding

Bada's Coding

"position: sticky": Tricky Parts

Bada's photo
Bada
·Jul 26, 2022·

1 min read

Example

Let me use this example to explain.

The Standard May Not Be 'body'.

The nearest ancestor which has scrolling function is the standard.

In the above example, the green box is the standard.

The Item Cannot Be out of Its Ancestor, Even Though 'sticky' Is Applied.

Even though the purple part is sticky, it disappears as its ancestor, which is the orange part, goes up.

 
Share this