QuizNot attempted
Why animate transform
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- transform can be handled by the compositor on the GPU (no layout or paint per frame); left triggers layout every frame
transform(andopacity) can be animated on a compositor layer by the GPU with no layout or paint per frame, whileleftchanges geometry and forces layout + paint every frame, which janks.- Not deprecated:
leftis perfectly valid. - Not works without position: true, but irrelevant to smoothness.
- Not a 30fps cap: browsers cap nothing
- it just drops frames when layout is expensive.
will-change: transformpromotes a layer ahead of time (sparingly, layers cost memory).