10 background-color: blue;
11 transform: translate(
0);
12 -webkit-transition-property: transform;
13 -webkit-transition-duration:
0.5s;
17 transform: translate(
50px);
21 transform: translate(
50px) scale(
1.05);
22 -webkit-transition-duration:
0.55s;
26 transform: translate(
0); /* same as default */
27 -webkit-transition-duration:
0.3s;
31 transform: translate(
100px);
32 -webkit-transition-duration:
0.4s;
40 <script src=
"transition-end-event-helpers.js"></script>
41 <script type=
"text/javascript">
43 var expectedEndEvents
= [
44 // [property-name, element-id, elapsed-time, listen]
45 ["transform", "box1", 0.5, false],
46 ["transform", "box2", 0.55, false],
47 ["transform", "box4", 0.4, false]
50 function transitionElement(index
)
52 var boxes
= document
.body
.getElementsByClassName('box');
53 boxes
[index
-1].className
= "box box" + index
;
58 var boxes
= document
.body
.getElementsByClassName('box');
59 for (var i
= 0; i
< boxes
.length
; ++i
) {
60 boxes
[i
].addEventListener("webkitTransitionEnd", recordTransitionEndEvent
, false);
63 window
.setTimeout(function() { transitionElement(1); }, 100);
64 window
.setTimeout(function() { transitionElement(2); }, 150);
65 window
.setTimeout(function() { transitionElement(3); }, 200);
66 window
.setTimeout(function() { transitionElement(4); }, 50);
67 window
.setTimeout(function() { transitionElement(5); }, 150);
70 runTransitionTest(expectedEndEvents
, setupTest
);
75 <p>Initiating transitions on transform properties of all boxes, starting at different times and with different durations and values.
</p>
78 <div id=
"box1" class=
"box"></div>
79 <div id=
"box2" class=
"box"></div>
80 <div id=
"box3" class=
"box"></div>
81 <div id=
"box4" class=
"box"></div>
82 <div id=
"box5" class=
"box"></div>
85 <div id=
"result"></div>