Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / computed-transform-value.html
blobcea435c8f6586992fd7d6806189ee4af06367bce
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Get Computed Transform</title>
8 <style type="text/css" media="screen">
9 .box {
10 height: 200px;
11 width: 200px;
12 background-color: #00a0a0;
14 </style>
15 <script type="text/javascript" charset="utf-8">
16 function printTransform(event)
18 var box = event.target;
19 var computedTransform = window.getComputedStyle(box).webkitTransform;
20 document.getElementById("output").innerHTML = 'Computed transform is ' + computedTransform;
23 </script>
24 </head>
25 <body onclick="printTransform(event)">
27 <h1>Testing transform computed style</h1>
28 <p>All boxes are 200x200 pixels. When you click on an element, the computed transform style will be displayed below</p>
29 <p id="output">Computed style for transform displayed here</p>
32 <div class="box" style="position: absolute; left: 100px; top: 200px; transform: scale(1.5, 0.75)">
33 scale(1.5, 0.75)
34 </div>
36 <div class="box" style="position: absolute; left: 400px; top: 200px; transform: rotate(30deg)">
37 rotate(30deg)
38 </div>
40 <div class="box" style="position: absolute; left: 100px; top: 400px; transform: translate(50px, 80px)">
41 translate(50px, 80px)
42 </div>
44 <div class="box" style="position: absolute; left: 400px; top: 400px; transform: translate(10px, 50px) scale(0.8) rotate(-10deg)">
45 translate(10px, 50px) scale(0.8) rotate(-10deg)
46 </div>
48 </body>
49 </html>