summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-transforms/perspective-origin-x.html
blob: 1ab8c2109eaf2781af6181153935073da5053606 (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>
<html>
<head>
    <title>CSS Transforms Test: perspective property</title>
    <link rel="author" title="Francisca Gil" href="mailto:pancha0.0@gmail.com">
    <link rel="reviewer" title="Apple Inc." href="http://www.apple.com">
    <link rel="help" href="http://www.w3.org/TR/css-transforms-2/#propdef-perspective-origin">
    <link rel="help" href="http://www.w3.org/TR/css-transforms-2/#perspective-property">
    <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-property">
    <link rel="match" href="reference/perspective-origin-reftest.html">
    <meta name="assert" content="Asserts that origin 'x1' visually moves the objects '-x1*d/(d-1)' ">
    <style type="text/css">
        .container {
            position: absolute;
            width: 150px;
            height: 150px;
            top: 100px;
            left: 100px;
            perspective: 3px;
            perspective-origin: 0px 50%;
        }
        .redSquare {
            position: absolute;
            top: 0px;
            left: 0px;
            width: 150px;
            height: 150px;
            background: red;
            transform: translateZ(0px);
         }
        .greenSquare {
            position: absolute;
            top: 25px;
            left: 0px;
            width: 100px;
            height: 100px;
            background: green;
            transform: translateZ(1px);
         }
    </style>
</head>
<body>
    <p>The test passes if there is a green square and no red.</p>
    <div class="container">
        <div class="redSquare"></div>
        <div class="greenSquare"></div>
    </div>
</body>
</html>