Open In App

CSS isolation Property

The isolation property in CSS is used to define whether an element must create new stacking content. It prevents an element from acquiring mix-blend mode from elements in the backdrop by creating a different stack element.
Note:  

Syntax:  



isolation: auto|isolate|initial|inherit;

Default Value: auto 

Property Values:  



Example:  In this example, we are using the above-explained property.




<!DOCTYPE html>
<html>
<head>
    <title>
        CSS | isolation Property
    </title>
    <style>
        .container {
            text-align: center;
            background-color: green;
            width: 400px;
            margin: auto;
        }
 
        .blend {
            width: 200px;
            height: 200px;
            mix-blend-mode: difference;
        }
 
        .isolate_enable {
            isolation: isolate;
        }
    </style>
</head>
 
<body>
    <div class="container">
        <h3>Image without isolation</h3>
 
        <img class="blend" src=
 
        <div class="isolate_enable">
            <h3>Image with isolation</h3>
            <img class="blend" src=
        </div>
    </div>
</body>
</html>

Output:  

Supported Browsers: The browser supported by isolation property are listed below:  


Article Tags :