will-change-stacking-context-mask-1.html (959B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS will-change: 'will-change: mask' creates a stacking context</title> 4 <link rel="author" title="L. David Baron" href="https://dbaron.org/"> 5 <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> 6 <link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change"> 7 <link rel="help" href="http://www.w3.org/TR/css-masking/#the-mask-image"> 8 <link rel="match" href="green-square-100-by-100-ref.html"> 9 <meta name="assert" content="If any non-initial value of a property would create a stacking context on the element, specifying that property in will-change must create a stacking context on the element."> 10 <style> 11 html, body { margin: 0; padding: 0; } 12 div { width: 100px; height: 100px } 13 #wc { will-change: mask; background: red } 14 #child { position: absolute; top: 0; left: 0; z-index: -1; background: green } 15 </style> 16 <body> 17 <div id="wc"> 18 <div id="child"> 19 </div> 20 </div> 21 </body>