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>Test animation with multiple keyframes
</title>
8 <style type=
"text/css" media=
"screen">
15 background-color: blue;
16 -webkit-animation-duration:
2s;
17 -webkit-animation-name: anim;
19 @-webkit-keyframes anim {
20 from { left:
10px; top:
10px; }
21 40% { left:
30px; width:
300px; }
22 60% { top:
40px; height:
400px; }
23 to { left:
20px; top:
0px; }
26 <script src=
"resources/animation-test-helpers.js" type=
"text/javascript" charset=
"utf-8">
28 <script type=
"text/javascript" charset=
"utf-8">
30 const expectedValues = [
31 // [time, element-id, property, expected-value, tolerance]
32 [
0.2,
"box",
"left",
18,
2],
33 [
0.2,
"box",
"top",
16.6,
2],
34 [
0.2,
"box",
"width",
182,
20],
35 [
0.2,
"box",
"height",
166,
20],
36 [
1.4,
"box",
"left",
22,
2],
37 [
1.4,
"box",
"top",
23.7,
2],
38 [
1.4,
"box",
"width",
140,
20],
39 [
1.4,
"box",
"height",
277,
20],
42 runAnimationTest(expectedValues);
47 This test performs a keyframed animation of multiple properties, with their values supplied in different groups of keyframes.
48 It animates over
2 seconds.