will-change-fixpos-cb-webkit-perspective-1.html (1388B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS will-change: 'will-change: -webkit-perspective' creates a containing block for fixed positioned elements</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="author" title="Google" href="https://www.google.com/"> 7 <link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change"> 8 <link rel="help" href="http://www.w3.org/TR/css3-transforms/#perspective-property"> 9 <link rel="help" href="https://compat.spec.whatwg.org/#css-simple-aliases"> 10 <link rel="match" href="green-square-100-by-100-offset-ref.html"> 11 <meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements."> 12 <style> 13 html, body { margin: 0; padding: 0; } 14 div { width: 100px; height: 100px } 15 #wc { will-change: -webkit-perspective; margin: 100px 0 0 100px; background: red } 16 .child { top: 0; left: 0; width: 50px; background: green } 17 #fixpos { position: fixed } 18 #abspos { position: absolute; left: 50px } 19 </style> 20 <body> 21 <div id="wc"> 22 <div class="child" id="fixpos"> 23 </div> 24 <div class="child" id="abspos"> 25 </div> 26 </div> 27 </body>