Today I Learned

[CSS] Create a new stacking context with isolation property

October 5, 2023

The isolation property can create a new stacking context on the element.

.pricing-card {
  isolation: isolate;
}

Before

After

Reference

https://developer.mozilla.org/en-US/docs/Web/CSS/isolation

https://courses.joshwcomeau.com/css-for-js

← All posts