1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
6 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8">
7 <title>Testing animation-name: none
</title>
9 <style type=
"text/css" media=
"screen">
14 -webkit-animation-name: 'fail';
15 -webkit-animation-duration:
3.5s;
16 -webkit-animation-iteration-count: infinite;
17 -webkit-animation-direction: alternate;
18 -webkit-animation-timing-function: linear;
21 @-webkit-keyframes 'fail' {
23 transform: rotate(-
90deg);
26 transform: rotate(
90deg);
32 background-color: blue;
33 -webkit-animation-name: 'sway1';
34 -webkit-animation-duration:
2.5s;
35 -webkit-animation-iteration-count: infinite;
36 -webkit-animation-direction: alternate;
37 -webkit-animation-timing-function: linear;
40 @-webkit-keyframes 'sway1' {
42 transform: translate(
0,
0);
45 transform: translate(
200px,
0);
51 background-color: red;
52 -webkit-animation-name: 'sway2';
53 -webkit-animation-duration:
3s;
54 -webkit-animation-iteration-count: infinite;
55 -webkit-animation-direction: alternate;
56 -webkit-animation-timing-function: linear;
59 @-webkit-keyframes 'sway2' {
61 transform: translate(
0px,
0);
64 transform: translate(
200px,
0);
70 background-color: green;
71 -webkit-animation-name: 'sway3';
72 -webkit-animation-duration:
3.5s;
73 -webkit-animation-iteration-count: infinite;
74 -webkit-animation-direction: alternate;
75 -webkit-animation-timing-function: linear;
78 @-webkit-keyframes 'sway3' {
80 transform: translate(
0px,
0);
83 transform: translate(
200px,
0);
89 background-color: orange;
90 -webkit-animation-name: 'none';
91 -webkit-animation-duration:
3s;
92 -webkit-animation-iteration-count: infinite;
93 -webkit-animation-direction: alternate;
94 -webkit-animation-timing-function: linear;
99 background-color: purple;
100 -webkit-animation-name: 'none';
101 -webkit-animation-duration:
3s;
102 -webkit-animation-iteration-count: infinite;
103 -webkit-animation-direction: alternate;
104 -webkit-animation-timing-function: linear;
109 background-color: blue;
110 -webkit-animation-name: 'fade', 'sway6';
111 -webkit-animation-duration:
3s,
4s;
112 -webkit-animation-iteration-count: infinite, infinite;
113 -webkit-animation-direction: alternate, alternate;
114 -webkit-animation-timing-function: linear, linear;
117 @-webkit-keyframes 'sway6' {
119 transform: translate(
0px,
0);
122 transform: translate(
200px,
0);
126 @-webkit-keyframes 'fade' {
135 /* set up animation that should never be run */
136 @-webkit-keyframes none {
138 transform: translate(
200px,
0) rotate(-
90deg);
141 transform: translate(
0px,
0) rotate(
90deg);
146 <script type=
"text/javascript" charset=
"utf-8">
147 function killanims() {
148 console.log(
"click");
149 var box1 = document.getElementById(
"box1");
150 box1.style.webkitAnimationName = '';
151 var box2 = document.getElementById(
"box2");
152 box2.style.webkitAnimationName = 'none';
153 var box3 = document.getElementById(
"box3");
154 box3.style.webkitAnimationName =
"'none'";
155 var box6 = document.getElementById(
"box6");
156 box6.style.webkitAnimationName =
"none, 'sway6'";
159 setTimeout(killanims,
2000);
164 <h2>Testing animation: none
</h2>
167 After
2 seconds only the blue rectangles should be
169 Any resulting animation
170 that involves rotation or fading means that this test has FAILED.
</p>
173 This rectangle starts with an animation. After
2 seconds a timer
174 will set the animation-name on the element to '' (the empty string).
175 The CSS rule should cause the animation to continue.
179 This rectangle starts with an animation. After
2 seconds a timer
180 will set the animation-name on the element to 'none' (as an identifier).
181 This should cause the animation to stop.
185 This rectangle starts with an animation. After
2 seconds a timer
186 will set the animation-name on the element to 'none' (as a string).
187 This should cause the animation to stop.
191 This rectangle starts with an animation, but animation-name is
192 set to 'none' (as an identifier). No animation should run.
196 This rectangle starts with an animation, but animation-name is
197 set to 'none' (as a string). No animation should run.
201 This rectangle starts with two animations. After
2 seconds a timer
202 will set the animation-name on the fade to 'none'. The other
203 animation (horizontal) should continue.