summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/backgrounds/fixed-background-on-descendant.html
blob: faaabce679249d4ee4de83142865132369054c91 (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
49
50
51
<!DOCTYPE html>
<style>
    body {
        height: 2000px;
        width: 2000px;
        overflow: hidden;
    }

    .box {
        width: 300px;
        height: 300px;
        margin: 20px;
        position: relative;
    }

    body > .box {
        border: 1px solid black;
        float: left;
    }
    .child {
        position: absolute;
        top: 50px;
        left: 50px;
        height: 200px;
        width: 200px;
        margin-left: 10px;
        background-image: url('../resources/alpha-blocks.png');
        background-size: 500px 300px;
        background-repeat: no-repeat;
        background-attachment: fixed;
        border: 4px solid gray;
    }

    .composited {
        transform: translateZ(0);
    }
</style>
<script>
    function doTest()
    {
        window.scrollTo(35, 45);
    }
    window.addEventListener('load', doTest, false);
</script>
<div class="composited box">
    <div class="child box"></div>
</div>

<div class="composited box">
    <div class="child box"></div>
</div>