| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style type="text/css" media="screen"> | |
| body { | |
| margin: 0; | |
| height: 1000px; | |
| } | |
| .box { | |
| width: 100px; | |
| height: 100px; | |
| outline: 1px solid black; | |
| } | |
| .fixed { | |
| position: fixed; | |
| } | |
| .transformed { | |
| -webkit-transform: rotate(0); | |
| } | |
| .indicator { | |
| position: absolute; | |
| background-color: red; | |
| } | |
| </style> | |
| <script type="text/javascript" charset="utf-8"> | |
| // Scroll on load to test fixed positioning. | |
| window.addEventListener('load', function() { | |
| window.scrollTo(0, 100); | |
| }, false) | |
| </script> | |
| </head> | |
| <body> | |
| <div class="indicator box" style="left: 50px; top: 200px;"></div> | |
| <div class="indicator box" style="left: 250px; top: 200px;"></div> | |
| <div class="transformed box" style="margin: 150px 50px;"> | |
| <div class="fixed box" style="background-color: green; margin-top: 50px;"> | |
| </div> | |
| </div> | |
| <div class="transformed fixed box" style="left: 250px; top: 50px;"> | |
| <div class="transformed box" style="margin-top: 50px; background-color: green;"> | |
| </div> | |
| </div> | |
| <p>Tests fixed position elements combined with transforms. You should see no red above.</p> | |
| </body> | |
| </html> |