summaryrefslogtreecommitdiffstats
path: root/layout/reftests/transform-3d/preserve3d-scale.html
blob: 099ef078deba791731613e7c3ccc4e5329d2c65a (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
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
  <style>
    svg{
      display: block;
      margin: auto;
      -webkit-transform-origin: top center;
      -webkit-transform: scale(1.5);
    }
    #cube{
      position: absolute;
      left: 25px;
      top: 25px;
      width: 74px;
      height: 74px;
      backface-visibility: visible;
      -webkit-transform-style: preserve-3d;
      -webkit-transform-origin: center center;
      -webkit-backface-visibility: visible;
      -webkit-transform: rotateX(-45deg) rotateY(50deg);
      -webkit-transition: -webkit-transform 1s;
    }

    .side{
      position: absolute;
      top: 0;
      left: 0;
      width: 74px;
      height: 74px;
      backface-visibility: visible;
      -webkit-transform-origin: center center;
      -webkit-backface-visibility: visible;
    }

    #cube .side:nth-child(1) {
	    -webkit-transform: translateY(37px) rotateX(90deg);
	    transform: translateY(37px) rotateX(90deg);
    }

    #cube .side:nth-child(2) {
	    -webkit-transform: translateY(-37px) rotateX(-90deg);
	    transform: translateY(-37px) rotateX(-90deg);

    }
  </style>
</head>
<body>
  <div id="cube">
    <svg class="side" width="100px" height="100px">
    <rect fill="#DAD6CC" width="74" height="74"></rect>
    <circle fill="#F8F1E5" cx="37" cy="37" r="27"></circle>
    <g>
    </g>
    </svg>
    <svg class="side" width="100px" height="100px">
    <rect fill="#DAD6CC" width="74" height="74"></rect>
    <circle fill="#F8F1E5" cx="37" cy="37" r="27"></circle>
    <g>
    </g>
    </svg>

  </div>
</body></html>