content-visibility

Allows the browser to skip the rendering work for elements that are currently off-screen. Setting it to 'auto' can drastically improve the initial load speed and scroll performance of long pages.

It is documented as part of the CSS Containment specification.

/* Usage Example */
.off-screen-section {
  /* Skips rendering until the user scrolls near it */
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

/* Syntax */
content-visibility: visible;
content-visibility: auto;
content-visibility: hidden;

/* Global values */
content-visibility: inherit;
content-visibility: initial;
content-visibility: revert;
content-visibility: revert-layer;
content-visibility: unset;

This comparison shows how content-visibility works in a real project. View snippet →

Newly available Since 2025 92% global usage

Since 2025 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

85+
125+
18+
85+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC