OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style> |
| 5 #willChangeTop { |
| 6 position: absolute; |
| 7 left: 200px; |
| 8 top: 100px; |
| 9 width: 100px; |
| 10 height: 100px; |
| 11 background-color: blue; |
| 12 color: white; |
| 13 } |
| 14 |
| 15 #willChangeTransform { |
| 16 -webkit-transform: translateZ(0); |
| 17 position: absolute; |
| 18 left: 200px; |
| 19 top: 300px; |
| 20 width: 100px; |
| 21 height: 100px; |
| 22 background-color: blue; |
| 23 color: white; |
| 24 } |
| 25 |
| 26 .fixed { |
| 27 position: fixed; |
| 28 left: 50px; |
| 29 top: 50px; |
| 30 width: 75px; |
| 31 height: 75px; |
| 32 background-color: green |
| 33 } |
| 34 </style> |
| 35 </head> |
| 36 |
| 37 <body> |
| 38 This test verifies that "will-change: -webkit-transform" creates a containing |
| 39 block for fixed position descendants, and that other values of will-change do |
| 40 not create such a containing block. |
| 41 <div id="willChangeTop"> |
| 42 will-change: top |
| 43 <div class="fixed"></div> |
| 44 </div> |
| 45 <div id="willChangeTransform"> |
| 46 will-change: -webkit-transform |
| 47 <div class="fixed"></div> |
| 48 </div> |
| 49 </body> |
| 50 |
| 51 </html> |
OLD | NEW |