Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
CSS Values and Units Test:
Viewports units are supported in transform properties (iframe)
</title>
<meta name="assert" content="
Viewports units are supported in transform properties (translate)
" />
<link
rel="author"
title="François REMY"
href="mailto:fremycompany.developer@yahoo.fr"
/ >
<style type="text/css">
html, body { margin: 0px; padding: 0px; overflow: hidden; }
html { background: green; }
#target, #over-target {
position: absolute; top: 0px; left: 0px;
width: 100px; height: 100px;
}
#target {
background: red;
transform: translate(200px, 200px);
}
#over-target {
background: green;
transform: translate(50vw, 50vh);
}
</style>
</head>
<body>
<div id="target"></div>
<div id="over-target"></div>
</body>
</html>