transform-default-parameter.html 1.28 KB
Newer Older
adele@apple.com's avatar
adele@apple.com committed
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
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">

<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Testing translate(x)</title>
    <style type="text/css" media="screen">
      
      div {
        position: absolute;
        width: 300px;
        height: 100px;
      }
      
      #box1 {
        top: 100px;
        left: 100px;
        background-color: blue;
        -webkit-transform: translate(400px); // this should evaluate as 400px, 0px
      }

      #box2 {
        top: 500px;
        left: 500px;
        background-color: green;
        -webkit-transform: translate3d(0px, 0px, -1px);
      }

      #box3 {
        top: 100px;
        left: 500px;
        background-color: red;
        -webkit-transform: translate3d(0px, 0px, -1px);
      }
      
    </style>
  </head>
  <body>
    <h1>Testing default translate parameter</h1>
    <p>There should be blue and green boxes shown. If there is a red box visible, the test has failed</p>
    
    <div id="box3">
      If you can see this box, then the test has failed.
    </div>

    <div id="box1">
      This box should be visible (it is translated).
    </div>

    <div id="box2">
      This box should be visible.
    </div>

    
  </body>
</html>