CSS · Properties — CSS Containment

contain

The CSS contain property. Initial value: none. Not inherited.

Syntax
contain: none | strict | content | [ [ size || inline-size ] || layout || style || paint ]

Example

Try it

Notes

Media: all. Applies to: allElements. Computed value: asSpecified.

More in this group

content-visibility

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course