OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style> |
| 5 body { |
| 6 height: 2000px; |
| 7 } |
| 8 |
| 9 .container { |
| 10 height: 200px; |
| 11 width: 300px; |
| 12 border: 4px solid black; |
| 13 overflow-y: scroll; |
| 14 resize: both; |
| 15 } |
| 16 |
| 17 .contents { |
| 18 height: 1000px; |
| 19 } |
| 20 |
| 21 .box { |
| 22 position: relative; |
| 23 z-index: 1; |
| 24 height: 100px; |
| 25 width: 100px; |
| 26 margin: 10px; |
| 27 background-color: blue; |
| 28 } |
| 29 |
| 30 .surface { |
| 31 opacity: 0.5; |
| 32 } |
| 33 |
| 34 .fixed { |
| 35 position: fixed; |
| 36 z-index: 0; |
| 37 background-color: green; |
| 38 left: 50px; |
| 39 top: 200px; |
| 40 height: 200px; |
| 41 width: 200px; |
| 42 } |
| 43 </style> |
| 44 <script> |
| 45 function setup() { |
| 46 if (!window.internals) { |
| 47 var pre = document.createElement("pre"); |
| 48 pre.innerHTML = "This test ensures that render surfaces grow to " |
| 49 + "accomodate clip children. If this test is working, you " |
| 50 + "should see that the green box is square."; |
| 51 document.body.appendChild(pre); |
| 52 } |
| 53 } |
| 54 window.onload = setup; |
| 55 </script> |
| 56 </head> |
| 57 <body> |
| 58 <div class="surface"> |
| 59 <div class="box"></div> |
| 60 <div class="container"> |
| 61 <div> |
| 62 <div class="box"></div> |
| 63 <div class="container"> |
| 64 <div class="fixed"></div> |
| 65 <div class="box"></div> |
| 66 <div class="box"></div> |
| 67 <div class="box"></div> |
| 68 <div class="box"></div> |
| 69 <div class="box"></div> |
| 70 </div> |
| 71 </div> |
| 72 </div> |
| 73 </div> |
| 74 </body> |
| 75 </html> |
OLD | NEW |