HTML/CSSAdvanced#css#stacking-context

What creates a new stacking context in CSS?

Besides position + non-auto z-index, a new stacking context is created by: opacity less than 1, transform/filter/perspective other than none, will-change, position: fixed/sticky, and flex/grid items with z-index set.

Example
.card {
  opacity: 0.99; /* creates a new stacking context */
  transform: translateZ(0); /* also creates one */
}

Related Questions

1
HTML/CSSIntermediate#css#bem

What is BEM methodology?

Open
2
HTML/CSSAdvanced#css#methodology

What are other CSS methodologies besides BEM (OOCSS, SMACSS, ITCSS)?

Open
3
HTML/CSSIntermediate#css#sass

What are CSS preprocessors and what problems do they solve?

Open