summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/overflow/fixed-position-ancestor-clip.html
blob: 259d3946457bb302efa7fa5096e7d7987fc96404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE>

<html>
<head>
  <title>Position fixed with transform</title>
  <style type="text/css" media="screen">
    body {
      height: 1000px;
      width: 1000px;
    }
    #fixed {
      position: fixed;
      width: 100px;
      height: 100px;
      background-color: red;
      overflow: hidden;
    }
    
    .box {
      width: 100px;
      height: 100px;
      background-color: green;
      -webkit-transform: translateZ(0);
    }

    p {
      position: absolute;
      left: 50px;
      top: 150px;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
    window.addEventListener('load', function() {
      window.scrollBy(50, 50);
    }, false);
  </script>
  <script src="../resources/mock_scrollbars.js"></script>
</head>
<body>
  
  <p>You should see a single green square, with no red.</p>
  <div id="fixed">
    <div class="box">
    </div>
  </div>

</body>
</html>