HTML & CSS · Senior · Question 26 of 75

What creates a new stacking context even without position and z-index?

Explanation

A stacking context is created by: the root element, positioned elements with z-index, flex/grid items with z-index, opacity < 1, transform, filter, perspective, mix-blend-mode, isolation: isolate, contain: paint, and will-change with such properties. isolation: isolate is the "cleanest" way to create one without side effects.

Further reading

Problem with a question

HTML & CSS · Senior · question 26

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz