Menu Samaritan's Purse

CONTAIN

The contain property allows an author to indicate that an element and its contents are independent of the rest of the document tree.

SYNTAX

CSS

contain: value;

JS

object.style.contain = "value";

VALUES

<'contain'> = none | strict | content | [ size || layout || style || paint ]
none

Indicates that the property has no effect.

strict

Turns on all forms of containment except style containment.

content

Turns on all forms of containment except size containment and style containment.

size

Turns on size containment.

layout

Turns on layout containment.

style

Turns on style containment.

paint

Turns on paint containment.

INITIAL

none

EXAMPLES

CONTENT

LAYOUT

NONE

PAINT

SIZE

STRICT

STYLE

JS

World Wide Web Consortium (W3C)