1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
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">
12 background-color: #00a0a0;
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;
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 -webkit-transform displayed here</p>
32 <div class="box" style="position: absolute; left: 100px; top: 200px; -webkit-transform: scale(1.5, 0.75)">
36 <div class="box" style="position: absolute; left: 400px; top: 200px; -webkit-transform: rotate(30deg)">
40 <div class="box" style="position: absolute; left: 100px; top: 400px; -webkit-transform: translate(50px, 80px)">
44 <div class="box" style="position: absolute; left: 400px; top: 400px; -webkit-transform: translate(10px, 50px) scale(0.8) rotate(-10deg)">
45 translate(10px, 50px) scale(0.8) rotate(-10deg)