property

Content visibility — CSS reference

content-visibility lets the browser skip some rendering work for contents. auto allows skipping when the contents are not relevant to the user; hidden skips contents until the property changes. Auto is not equivalent to display:none. This fixture verifies the visible in-viewport case only.

Formal Syntax & Structure

css syntaxcss
content-visibility: auto;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>content-visibility</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#box{width:150px;content-visibility:auto}</style><body><section id="box"><div id="child" style="width:100px;height:60px">Content</div></section></body></html>
CSS Reference