Style isolation Property
Example
Create a new stacking context for the element with id="d":
document.getElementById("d").style.isolation = "isolate";
Try it Yourself »
Definition and Usage
The isolation property defines whether an element must create a new stacking content.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
isolation | 41.0 | 79.0 | 36.0 | Yes | 30.0 |
Syntax
Return the isolation property:
object.style.isolation
Set the isolation property:
object.style.isolation = "auto|isolate|initial|inherit"
Property Values
Value | Description |
---|---|
auto | Default. A new stacking context is created only if one of the properties applied to the element requires it |
isolate | A new stacking context must be created |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technical Details
Default Value: | auto |
---|---|
CSS Version | CSS3 |
Related Pages
CSS reference: isolation property