will-change
Tells the browser that an element is expected to change soon, allowing the browser to optimize for that change before it happens. Use it sparingly to improve performance for complex animations.
It is documented as part of the CSS Will Change specification.
Syntax
/* Usage Example */
.complex-animation {
will-change: transform, opacity;
/* hints to the browser to prepare for heavy GPU work */
}
/* Syntax */
will-change: auto;
/* Global values */
will-change: inherit;
will-change: initial;
will-change: revert;
will-change: revert-layer;
will-change: unset;
will-change Browser support
Widely available
Since
2020 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
36+
36+
9.1+
79+