CSS3 & Modern Layouts (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
Cumulative Layout Shift (CLS) Prevention: `aspect-ratio: 16 / 9`.
senior LevelSystem Design
In Simple Words: Cumulative Layout Shift occurs when images, iframes, or ads load and suddenly push down surrounding page content.
- Setting
aspect-ratio: 16 / 9allows the browser to reserve the exact layout box dimensions before the image or video payload downloads, completely eliminating layout jumps.