OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 | 3 |
4 <html lang="en"> | 4 <html lang="en"> |
5 <head> | 5 <head> |
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
7 <title>Position fixed</title> | 7 <title>Position fixed</title> |
8 <script src="../resources/mock_scrollbars.js"></script> | 8 <script src="../resources/mock_scrollbars.js"></script> |
9 <style type="text/css" media="screen"> | 9 <style type="text/css" media="screen"> |
10 body { | 10 body { |
(...skipping 10 matching lines...) Expand all Loading... |
21 background-color: orange; | 21 background-color: orange; |
22 } | 22 } |
23 | 23 |
24 .box { | 24 .box { |
25 height: 50px; | 25 height: 50px; |
26 width: 50px; | 26 width: 50px; |
27 background-color: green; | 27 background-color: green; |
28 } | 28 } |
29 | 29 |
30 .compositing { | 30 .compositing { |
31 -webkit-transform: translateZ(0); | 31 transform: translateZ(0); |
32 } | 32 } |
33 | 33 |
34 p { | 34 p { |
35 position: absolute; | 35 position: absolute; |
36 left: 50px; | 36 left: 50px; |
37 top: 150px; | 37 top: 150px; |
38 } | 38 } |
39 </style> | 39 </style> |
40 <script type="text/javascript" charset="utf-8"> | 40 <script type="text/javascript" charset="utf-8"> |
41 window.addEventListener('load', function() { | 41 window.addEventListener('load', function() { |
42 window.scrollBy(50, 50); | 42 window.scrollBy(50, 50); |
43 }, false); | 43 }, false); |
44 </script> | 44 </script> |
45 </head> | 45 </head> |
46 <body> | 46 <body> |
47 | 47 |
48 <p>You should see a green square in the top left corner of an orange box.</p> | 48 <p>You should see a green square in the top left corner of an orange box.</p> |
49 <div id="fixed"> | 49 <div id="fixed"> |
50 <div class="compositing box"> | 50 <div class="compositing box"> |
51 </div> | 51 </div> |
52 </div> | 52 </div> |
53 | 53 |
54 </body> | 54 </body> |
55 </html> | 55 </html> |
OLD | NEW |