HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> #outerDiv{ background:#0080ff; height: 170px; margin-bottom: 20px; } img{ width: 282px; height: 169px; mix-blend-mode: overlay; } </style> </head> <body> <h1>CSS isolation Property</h1> <div id="outerDiv"> <div id="innerDiv"> <img src="car-left.png"> </div> </div> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementById("innerDiv"); function myFunction(){ x.style.isolation = "isolate"; } </script> <p><strong>Note</strong>: Click on the button to isolate the image.</p> </body> </html>
OUTPUT
×

Save as Private