FrontendDeveloper.in

CSS question detail

What is stacking context and `z-index`?

z-index only compares elements within the same stacking context. New contexts are created by properties like positioned elements with z-index, opacity < 1, transform, and filter.

Many z-index bugs come from unexpected stacking contexts.

Back to all CSS questions
Get LinkedIn Premium at Rs 399