Browser & Web Performance · Senior · Question 73 of 75
The hero heading fades in with an animation from opacity: 0. How can this affect LCP?
- 1It doesn't, LCP ignores CSS
- ✓Correct answer: Elements with zero opacity aren't LCP candidates, so LCP is recorded only when the element becomes visible, after the animation starts
- 3It improves LCP because the browser paints it earlier
Explanation
Entrance animations on the main content trade a nice effect for a later LCP. Keep the LCP element visible from the first paint.