Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / geometry / fixed-position.html
blob60a86e4cd2476d0f9f295d7c02d55a83faf5dcce
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Position fixed</title>
8 <script src="../resources/mock_scrollbars.js"></script>
9 <style type="text/css" media="screen">
10 ::-webkit-scrollbar {
11 width: 0px;
12 height: 0px;
14 body {
15 height: 1000px;
16 width: 1000px;
18 #fixed {
19 position: fixed;
20 top: 0;
21 left: 0;
22 height: 100px;
23 width: 100px;
24 opacity: 0.8; /* makes this a compositing layer without assigning a transform */
25 background-color: orange;
28 .box {
29 height: 50px;
30 width: 50px;
31 background-color: green;
34 .compositing {
35 transform: translateZ(0);
38 p {
39 position: absolute;
40 left: 50px;
41 top: 150px;
43 </style>
44 <script type="text/javascript" charset="utf-8">
45 window.addEventListener('load', function() {
46 window.scrollBy(50, 50);
47 }, false);
48 </script>
49 </head>
50 <body>
52 <p>You should see a green square in the top left corner of an orange box.</p>
53 <div id="fixed">
54 <div class="compositing box">
55 </div>
56 </div>
58 </body>
59 </html>