<!DOCTYPE> <html> <head> <title>Masks with composited children</title> <style type="text/css" media="screen"> #container { height: 560px; width: 260px; border: 1px solid black; display: inline-block; } .box { position: relative; width: 200px; height: 200px; margin: 30px; border: 10px solid black; background-color:rgba(100, 100, 255, 0.8); -webkit-box-sizing: border-box; -webkit-box-shadow: black 0 4px 4px; } .compositing { transform: translateZ(0); } .masked { -webkit-mask-image: url(../resources/alpha-gradient.png); -webkit-mask-repeat: repeat-x; } </style> </head> <body> <p>Testing masks on compositing layers. Left and right columns should look the same.</p> <div id="container" class="masked"> <div class="box"></div> </div> <div id="container" class="masked"> <div class="compositing box"></div> </div> </body> </html>