1 <!DOCTYPE html>
2 <html><head>
3 <meta charset="utf-8">
4 <title>
5 CSS Values and Units Test:
6 Viewports units are supported in transform properties (iframe)
7 </title>
8 <meta content="
9 Viewports units are supported in transform properties (translate)
10 " name="assert">
11
12 <link href="mailto:fremycompany.developer@yahoo.fr" rel="author" title="François REMY">
13
14 <link href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" rel="help">
15 <link href="http://www.w3.org/TR/css3-2d-transforms/#css-values" rel="help">
16
17 <style type="text/css">
18
19 html, body { margin: 0px; padding: 0px; overflow: hidden; }
20
21 html { background: green; }
22 #target, #over-target {
23 position: absolute; top: 0px; left: 0px;
24 width: 100px; height: 100px;
25 }
26
27 #target {
28 background: red;
29 transform: translate(200px, 200px);
30 }
31
32 #over-target {
33 background: green;
34 transform: translate(50vw, 50vh);
35 }
36
37 </style>
38
39 </head>
40 <body>
41
42 <div id="target"></div>
43 <div id="over-target"></div>
44
45
46
47 </body></html>