seniorCSS

What is the CSS content-visibility property?

Updated Apr 28, 2026

Short answer

content-visibility enables the browser to skip rendering work for off-screen elements, massively improving initial load performance.

Deep explanation

When set to 'auto', the browser skips layout and painting for elements outside the viewport. When the user scrolls near them, they are rendered just-in-time. You must provide contain-intrinsic-size to prevent layout shifts.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More CSS interview questions

View all →