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>Transition Events</title>
8 <style type="text/css" media="screen">
14 background-color: blue;
16 -webkit-transition-property: left;
17 -webkit-transition-duration: 2s;
26 background-color: red;
28 -webkit-transition-property: left;
29 -webkit-transition-duration: 2s;
38 border: 1px solid black;
41 <script type="text/javascript" charset="utf-8">
46 document.addEventListener('webkitTransitionEnd', function(e) {
55 var box = document.getElementById("box" + id);
56 box.style.left = "" + offset + "px";
58 if (!switch1) switch2 = !switch2;
64 var box1 = document.getElementById("box1");
65 box1.style.left = "200px";
68 function logTransition(event)
70 var log = document.getElementById('log');
71 log.innerHTML = log.innerHTML + '<br>Property: ' + event.propertyName + ' Time: ' + event.elapsedTime;
76 <h2>Transition Events</h2>
77 <p>Click to start transitions. Once started, transition end events should keep
78 things moving forever.</p>
79 <div id="container" onclick="doClick(this)">