Browser & Web Performance · Middle · Question 31 of 75

Why are animations with transform better than animating top for CLS?

Explanation

Animating top, margin or height moves layout boxes, which can be reported as layout shifts and costs layout work each frame.

Further reading

Problem with a question

Browser & Web Performance · Middle · question 31

Test yourself

Take the Browser & Web Performance · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz