Today I Learned

[CSS] Create a new stacking context with isolation property

October 05, 2023

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

.pricing-card {
  isolation: isolate;
}

Before

isolate before

After

isolate after

Reference

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

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


© 2025 - Written by Vuong Vu. Connect with me on LinkedIn.