📐

CSS z-index cascading context visualization

Add elements, set z-index and trigger the properties of the cascading context, and view the cascading order in real time

Stacked canvases (rendered in z-index order, later on top)
Stacking order (bottom → top)
Edit properties: —
Click the element on the left or the element in the canvas, select and edit the properties
Description of cascading context trigger conditions
The following properties will New A stacking context that makes the z-index of child elements independent of each other:
· position: relative/absolute/fixed/sticky and z-index ≠ auto
· opacity < 1
· transform ≠ none
· isolation: isolate
· will-change 、 filter 、 perspective etc.

The z-index of the child element is only in Same cascading context Compare within, compare across contexts Parent container .
Generate CSS
/* 添加元素后自动生成 CSS */