HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

contain

Description

The contain property for CSS 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

1 · content

2 · layout

3 · none

4 · paint

5 · size

6 · strict

7 · style

8 · JS