HTML & CSS · Middle · Question 16 of 75
How should will-change be used?
- 1Set
will-change: transformon every element globally to speed things up - ✓Correct answer: Sparingly - on elements about to animate, removing it afterwards
- 3Use it instead of
transition; it's the modern replacement
Explanation
will-change hints the browser to prepare a layer in advance. Used broadly, it eats memory (each layer is a separate texture) and can slow the page down. It's a last resort for a specific performance problem, not a replacement for transition.