summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting.html
blob: 9cf87267028c1329394db7bfbc87fbc0fe3cf171 (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
<!DOCTYPE>
<html>
<head>
<title>Perpendicular layer sorting</title>

<style type="text/css" media="screen">
    #container {
        position: relative;
        height: 300px;
        width: 300px;
        margin: 50px 100px;
        -webkit-perspective: 500;
    }
 
    #parent {
        margin: 10px;
        width: 280px;
        height: 280px;
        background-color: purple;
        -webkit-transform-style: preserve-3d;
        transform: rotateY(20deg);
    }

    #parent > div {
        position: absolute;
        top: 40px;
        left: 40px;
        width: 200px;
        height: 400px;
        padding: 10px;
        background-color: green;
        transform: translateY(50px) translateZ(10px) rotateX(90deg);
    }
</style>
<script type="text/javascript" charset="utf-8">
    if (window.testRunner)
        testRunner.dumpAsTextWithPixelResults();
</script>
</head>
<body>
<!-- The green layer should not overlap the purple layer -->
<div id="container"> 
    <div id="parent"> 
        <div></div> 
    </div> 
</div> 

</body>
</html>