Mon, 30 Jan 2012 15:59:09 +0000
2012-01-30 simon.fraser@apple.com
Editorial only; change all <span class=""> to <code> to get default.css styling,
and minor reformatting.
1 <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
2 'http://www.w3.org/TR/html4/strict.dtd'>
4 <html lang="en">
5 <head>
6 <title>CSS Animations</title>
7 <link rel="stylesheet" type="text/css" href="../default.css">
8 <style type="text/css">
9 .rhs { white-space: pre-wrap; }
10 code { font-size: inherit; }
11 #box-shadow-samples td { background: white; color: black; }
13 table {
14 border-collapse: collapse;
15 }
16 td {
17 padding: 0.2em 1em;
18 border: 1px solid black;
19 }
20 </style>
21 <link rel="stylesheet" type="text/css"
22 href="http://www.w3.org/StyleSheets/TR/W3C-WD.css">
23 </head>
25 <body>
27 <div class="head">
28 <!--logo-->
30 <h1>CSS Animations</h1>
32 <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
33 <dl>
34 <dt>This version:
35 <dd><a href="[VERSION]">http://dev.w3.org/csswg/css3-animations/</a>
36 <!--http://www.w3.org/TR/[YEAR]/WD-[SHORTNAME]-[CDATE]-->
37 <dt>Latest version:
38 <dd><a
39 href="http://www.w3.org/TR/css3-animations">[LATEST]</a>
40 <dt>Editor's draft:
41 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
43 <dt>Previous version:
44 <dd><a href="http://www.w3.org/TR/2009/WD-css3-animations-20090320/">
45 http://www.w3.org/TR/2009/WD-css3-animations-20090320/</a>
46 <dt id="editors-list">Editors:
47 <dd><a href="mailto:dino@apple.com">Dean Jackson</a> (<a
48 href="http://www.apple.com/">Apple Inc</a>)
49 <dd><a href="mailto:hyatt@apple.com">David Hyatt</a> (<a
50 href="http://www.apple.com/">Apple Inc</a>)
51 <dd><a href="mailto:cmarrin@apple.com">Chris Marrin</a> (<a
52 href="http://www.apple.com/">Apple Inc</a>)
53 <dd><a href="mailto:sylvaing@microsoft.com">Sylvain Galineau</a>
54 (<a class=org href="http://www.microsoft.com/">Microsoft</a>)
55 <dd class=vcard><a class=fn href="http://dbaron.org/">L. David Baron</a>
56 (<a class=org href="http://www.mozilla.org/">Mozilla</a>)
58 <dt>Issues list:
59 <dd>none yet
61 <dt>Test suite:
62 <dd>none yet
63 </dl>
65 <!--copyright-->
67 <hr title="Separator for header">
68 </div>
70 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
72 <p>This CSS module describes a way for authors to animate the values of CSS properties over time, using keyframes.
73 The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats,
74 and repeating behavior.
75 </p>
77 <h2 class="no-num no-toc" id="status">Status of this document</h2>
78 <!--status-->
81 <h2 class="no-num no-toc" id="contents">Table of contents</h2>
82 <!--toc-->
85 <h2 id="introduction">Introduction</h2>
87 <p><em>This section is not normative.</em>
89 <p>
90 CSS Transitions [[!CSS3-TRANSITIONS]] provide a way to interpolate CSS property values
91 when they change as a result of underlying property changes. This provides an easy way to do simple animation,
92 but the start and end states of the animation are controlled by the existing property values,
93 and transitions provide little control to the author on how the animation progresses.
94 </p>
95 <p>
96 This proposal introduces <em>defined animations</em>, in which the author can
97 specify the changes in CSS properties over time as a set of keyframes. Animations are similar to transitions
98 in that they change the presentational value of CSS properties over time.
99 The principal difference is that while transitions trigger <i>implicitly</i> when property values change, animations
100 are <i>explicitly</i> executed when the animation properties are applied. Because of this, animations require explicit
101 values for the properties being animated. These values are specified using animation keyframes, described below.
102 </p>
103 <p>
104 Many aspects of the animation can be controlled, including how many times the animation iterates, whether or not
105 it alternates between the begin and end values, and whether or not the animation should be running or paused.
106 An animation can also delay its start time.
107 </p>
109 <h2>Animations</h2>
111 <p>
112 CSS Animations affect computed property values. During the execution of an animation, the
113 computed value for a property is controlled by the animation. This overrides the value
114 specified in the normal styling system.
115 </p>
117 <p>
118 In the case of multiple animations specifying behavior for the same property, the animation
119 defined last will override the previously defined animations.
120 </p>
122 <p>
123 An animation does not affect the computed value before the application of the animation,
124 before the animation delay has expired, and after the end of the animation.
125 </p>
127 <div class="figure">
128 <img src="sandwich.png" alt="">
129 </div>
130 <p class="caption">
131 Computation of animated property values
132 </p>
134 <p>
135 The diagram above shows how property values are computed. The intrinsic style is shown at the
136 top of the diagram. The computed value is derived from intrinsic style at the times when an
137 animation is not running and also when an animation is delayed (see below for specification of
138 animation delay). During an animation, the computed style is derived from the animated value.
139 </p>
141 <p>
142 The start time of an animation is the latter of two moments: the time at which the style is
143 resolved that specifies the animation, or the time the document's load event is fired.
144 Therefore, an animation specified in the document stylesheet will begin at the document load.
145 An animation specified on an element by modifying the style after the document has loaded will
146 start when the style is resolved. That may be immediately in the case of a pseudo style rule
147 such as hover, or may be when the scripting engine returns control to the browser (in the case
148 of style applied by script).
149 </p>
151 <p>
152 An animation applies to an element if the element has a value for
153 <code class="property">'animation-name'</code> that references a valid
154 keyframes rule. Once an animation has started it continues until it ends
155 or the <code class="property">'animation-name'</code> is removed. The values
156 used for the keyframes and animation properties are snapshotted at the
157 time the animation starts. Changing them during the execution of the
158 animation has no effect. Note also, that changing the value of
159 <code class="property">'animation-name'</code> does not necessarily
160 restart an animation (e.g. if a list of animations are applied and
161 one is removed from the list, only that animation will stop; The other
162 animations will continue). In order to restart an animation, it must be
163 removed then reapplied.
164 </p>
166 <p>
167 The end of the animation is defined by the combination of the
168 <code class="property">'animation-duration'</code>,
169 <code class="property">'animation-iteration-count'</code> and
170 <code class="property">'animation-fill-mode'</code> properties.
171 </p>
173 <div class="example">
174 <p style="display:none">
175 Example(s):
176 </p>
177 <pre>
178 div {
179 animation-name: diagonal-slide;
180 animation-duration: 5s;
181 animation-iteration-count: 10;
182 }
184 @keyframes diagonal-slide {
186 from {
187 left: 0;
188 top: 0;
189 }
191 to {
192 left: 100px;
193 top: 100px;
194 }
196 }
198 </pre>This will produce an animation that moves an element from (0, 0) to (100px, 100px) over five seconds and repeats itself nine times (for a total of ten iterations).
199 </div>
201 <h2>Keyframes</h2>
202 <p>
203 Keyframes are used to specify the values for the animating properties at various points
204 during the animation. The keyframes specify the behavior of one cycle of the animation;
205 the animation may iterate one or more times.
206 </p>
207 <p>
208 Keyframes are specified using a specialized CSS at-rule. A <code
209 class="property">@keyframes</code> rule consists of the keyword
210 "@keyframes", followed by an identifier giving a name for the animation
211 (which will be referenced using <code class="property">'animation-name'</code>),
212 followed by a set of style rules (delimited by curly braces).
213 </p>
214 <p>
215 The <i>keyframe selector</i> for a keyframe style rule consists of a
216 comma-separated list of percentage values or the keywords 'from' or
217 'to'. The selector is used to specify the percentage along the duration
218 of the animation that the keyframe represents. The
219 keyframe itself is specified by the block of property values declared on
220 the selector. The keyword 'from' is equivalent to the value 0%. The
221 keyword 'to' is equivalent to the value 100%. Note that the percentage
222 unit specifier must be used on percentage values. Therefore, "0" is an
223 invalid keyframe selector.
224 </p>
225 <p>
226 If a 0% or "from" keyframe is not specified, then the user agent
227 constructs a 0% keyframe using the computed values of the properties
228 being animated. If a 100% or "to" keyframe is not specified, then the user agent
229 constructs a 100% keyframe using the computed values of the properties
230 being animated.
231 </p>
232 <p>
233 The <i>keyframe declaration</i> for a keyframe rule consists of
234 properties and values. Properties that are unable to be
235 animated are ignored in these rules, with the exception of <code
236 class="property">'animation-timing-function'</code>, the behavior
237 of which is described below.
238 </p>
239 <p class="note">
240 NOTE: describe what happens if a property is not present in all keyframes.
241 </p>
242 <p>
243 The @keyframes rule that is used by an animation will be the last one encountered in sorted rules order
244 that matches the name of the animation specified by the <code class="property">'animation-name'</code> property.
245 <code class="css">@keyframes</code> rules do not cascade;
246 therefore an animation will never derive keyframes from more than one <code class="css">@keyframes</code> rule.
247 </p>
248 <p>
249 To determine the set of keyframes, all of the values in the selectors are sorted in increasing order by time.
250 If there are any duplicates, then the last keyframe specified inside the <code class="css">@keyframes</code> rule
251 will be used to provide the keyframe information for that time. There is no cascading within a
252 <code class="css">@keyframes</code> rule if multiple keyframes specify the same keyframe selector values.
253 </p>
254 <p>
255 If property is not specified for a keyframe, or is specified but invalid, the animation of that property proceeds
256 as if that keyframe did not exist. Conceptually, it is as if a set of keyframes is constructed for each property
257 that is present in any of the keyframes, and an animation is run independently for each one.
258 </p>
259 <div class="example">
260 <p style="display:none">
261 Example(s):
262 </p>
263 <pre>
264 @keyframes wobble {
265 0% {
266 left: 100px;
267 }
269 40% {
270 left: 150px;
271 }
273 60% {
274 left: 75px;
275 }
277 100% {
278 left: 100px;
279 }
280 }
282 </pre>Four keyframes are specified for the animation named "wobble". In the first keyframe, shown at the beginning of the animation cycle, the 'left' value of the animation is 100px. By 40% of the animation duration, 'left' value has animated to 150px. At 60% of the animation duration, the 'left' value has animated back to 75px. At the end of the animation cycle, the 'left' value has returned to 100px. The diagram below shows the state of the animation if it were given a duration of 10s.
283 <div class="figure">
284 <img src="animation1.png" alt="">
285 </div>
286 <p class="caption">
287 Animations states specified by keyframes
288 </p>
289 </div>
291 <p>
292 The following is the grammar for the keyframes rule.
293 </p>
295 <pre>
297 keyframes-rule: KEYFRAMES_SYM S+ IDENT S* '{' S* keyframes-blocks '}' S*;
299 keyframes-blocks: [ keyframe-selector '{' S* declaration? [ ';' S* declaration? ]* '}' S* ]* ;
301 keyframe-selector: [ FROM_SYM | TO_SYM | PERCENTAGE ] S* [ ',' S* [ FROM_SYM | TO_SYM | PERCENTAGE ] S* ]*;
303 @{K}{E}{Y}{F}{R}{A}{M}{E}{S} {return KEYFRAMES_SYM;}
304 {F}{R}{O}{M} {return FROM_SYM;}
305 {T}{O} {return TO_SYM;}
306 </pre>
307 <!-- ======================================================================================================= -->
308 <h3>
309 Timing functions for keyframes
310 </h3>
311 <p>
312 A keyframe style rule may also declare the timing function that is to be used as the animation moves to the next keyframe.
313 </p>
314 <div class="example">
315 <p style="display:none">
316 Example(s):
317 </p>
318 <pre>
319 @keyframes bounce {
321 from {
322 top: 100px;
323 animation-timing-function: ease-out;
324 }
326 25% {
327 top: 50px;
328 animation-timing-function: ease-in;
329 }
331 50% {
332 top: 100px;
333 animation-timing-function: ease-out;
334 }
336 75% {
337 top: 75px;
338 animation-timing-function: ease-in;
339 }
341 to {
342 top: 100px;
343 }
345 }
347 </pre>Five keyframes are specified for the animation named "bounce". Between the first and second keyframe (ie. between 0% and 25%) an "ease-out" timing function is used. Between the second and third keyframe (ie. between 25% and 50%) an "ease-in" timing function is used. And so on. The effect will appear as an element that moves up the page 50px, slowing down as it reaches its highest point then speeding up as it falls back to 100px. The second half of the animation behaves in a similar manner, but only moves the element 25px units up the page. A timing function specified on the "to" or 100% keyframe is ignored
348 </div>
349 <p>
350 See <a href="#animation-timing-function_tag">the <code class="property">'animation-timing-function'</code>
351 property</a> for more information.
352 </p><!-- ======================================================================================================= -->
354 <!-- ======================================================================================================= -->
355 <h3>
356 The <code class="property">'animation-name'</code> Property
357 </h3>
358 <p>
359 The <code class="property">'animation-name'</code> property defines a
360 list of animations that apply. Each name is used to select the keyframe at-rule
361 that provides the property values for the animation. If the name does
362 not match any keyframe at-rule, there are no properties to be animated
363 and the animation will not execute. Furthermore, if the animation name
364 is 'none' then there will be no animation. This can be used to override
365 any animations coming from the cascade. If animations are attempting to
366 modify the same property, then the animation closest to the end of the
367 list of names wins.
368 </p>
369 <p>
370 Each animation listed by name should have a corresponding value
371 for the other animation properties listed below. In the case where the
372 other properties do not have lists of the correct length, their values
373 are repeated to form a list with the same number of entries as
374 <code class="property">'animation-name'</code>.
375 </p>
376 <table class="propdef">
377 <tbody>
378 <tr>
379 <td>
380 <em>Name:</em>
381 </td>
382 <td>
383 <dfn id="animation-name">animation-name</dfn>
384 </td>
385 </tr>
386 <tr>
387 <td>
388 <em>Value:</em>
389 </td>
390 <td>
391 none | IDENT [, none | IDENT ]*
392 </td>
393 </tr>
394 <tr>
395 <td>
396 <em>Initial:</em>
397 </td>
398 <td>
399 none
400 </td>
401 </tr>
402 <tr>
403 <td>
404 <em>Applies to:</em>
405 </td>
406 <td>
407 all elements, :before and :after pseudo elements
408 </td>
409 </tr>
410 <tr>
411 <td>
412 <em>Inherited:</em>
413 </td>
414 <td>
415 no
416 </td>
417 </tr>
418 <tr>
419 <td>
420 <em>Percentages:</em>
421 </td>
422 <td>
423 N/A
424 </td>
425 </tr>
426 <tr>
427 <td>
428 <em>Media:</em>
429 </td>
430 <td>
431 visual
432 </td>
433 </tr>
434 <tr>
435 <td>
436 <em>Computed value:</em>
437 </td>
438 <td>
439 Same as specified value.
440 </td>
441 </tr>
442 </tbody>
443 </table>
445 <!--
446 <p>
447 It is possible for elements to have multiple animations running that change the same property or properties. In this case the animations combine in a manner defined by the property. For example, animations on <code class="property">'opacity'</code> will add together and animations on <code class="property">'transform'</code> will have their transformation matrices multiplied.
448 </p>
449 <div class="example">
450 <p style="display:none">
451 Example(s):
452 </p>
453 <pre>
454 @keyframes 'border-bloat' {
455 from {
456 border-width: 0;
457 }
458 to {
459 border-width: 10px;
460 }
461 }
463 @keyframes 'border-diet' {
464 from {
465 border-width: 4px;
466 }
467 to {
468 border-width: 2px;
469 }
470 }
472 div {
473 animation-name: 'border-bloat', 'border-diet';
474 animation-duration: 10s, 4s;
475 }
476 </pre>
477 <p>
478 The above example has two animations executing on the same property, <code class="property">'border-width'</code>. The animations are additive. That is, the
479 resulting value for the property will be the addition of the values from the
480 two animations.
481 </p>
482 <p>
483 At time '0s' the element's border will be 4px wide (0px from 'border-bloat' plus 4px from 'border-diet').
484 At time '4s' the element's border will be 6px wide (4px from 'border-bloat' plus 2px from 'border-diet').
485 At time '10s' the element's border will be 10px wide (10px from 'border-bloat' and no addition from
486 'border-diet' as it is no longer executing).
487 </p>
488 </div>
489 -->
492 <!-- ======================================================================================================= -->
493 <h3>
494 The <code class="property">'animation-duration'</code> Property
495 </h3>
496 <p>
497 The <code class="property">'animation-duration'</code> property defines the length of time that an animation takes to complete one cycle.
498 </p>
499 <table class="propdef">
500 <tbody>
501 <tr>
502 <td>
503 <em>Name:</em>
504 </td>
505 <td>
506 <dfn id="animation-duration">animation-duration</dfn>
507 </td>
508 </tr>
509 <tr>
510 <td>
511 <em>Value:</em>
512 </td>
513 <td>
514 <time> [, <time>]*
515 </td>
516 </tr>
517 <tr>
518 <td>
519 <em>Initial:</em>
520 </td>
521 <td>
522 0s
523 </td>
524 </tr>
525 <tr>
526 <td>
527 <em>Applies to:</em>
528 </td>
529 <td>
530 all elements, :before and :after pseudo elements
531 </td>
532 </tr>
533 <tr>
534 <td>
535 <em>Inherited:</em>
536 </td>
537 <td>
538 no
539 </td>
540 </tr>
541 <tr>
542 <td>
543 <em>Percentages:</em>
544 </td>
545 <td>
546 N/A
547 </td>
548 </tr>
549 <tr>
550 <td>
551 <em>Media:</em>
552 </td>
553 <td>
554 visual
555 </td>
556 </tr>
557 <tr>
558 <td>
559 <em>Computed value:</em>
560 </td>
561 <td>
562 Same as specified value.
563 </td>
564 </tr>
565 </tbody>
566 </table>
568 <p>
569 By default the value is '0s', meaning that the animation cycle is
570 immediate. A negative value for <code
571 class="property">'animation-duration'</code> is treated as '0s'. In this
572 case <code class="property">'animation-fill-mode'</code> still applies,
573 so an animation that fills backwards will show the value of the 0%
574 keyframe during any delay period, and an animation that fill forwards
575 will retain the value specified at the 100% keyframe, even if the
576 animation was instantaneous. Also, animation events are still fired.
577 </p>
579 <!-- ======================================================================================================= -->
580 <h3 id="animation-timing-function_tag">
581 The <code class="property">'animation-timing-function'</code> Property
582 </h3>
583 <p>
584 The <code class="property">'animation-timing-function'</code> property describes how the animation will progress over one cycle of its duration. See the <code class="property">'transition-timing-function'</code> property [[!CSS3-TRANSITIONS]] for a complete description of timing function calculation.
585 </p>
586 <table class="propdef">
587 <tbody>
588 <tr>
589 <td>
590 <em>Name:</em>
591 </td>
592 <td>
593 <dfn id="animation-timing-function">animation-timing-function</dfn>
594 </td>
595 </tr>
596 <tr>
597 <td>
598 <em>Value:</em>
599 </td>
600 <td>
601 ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(<number>[, start | end ]) | cubic-bezier(<number>, <number>, <number>, <number>) [, ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(<number>[, start | end ]) | cubic-bezier(<number>, <number>, <number>, <number>)]*
602 </td>
603 </tr>
604 <tr>
605 <td>
606 <em>Initial:</em>
607 </td>
608 <td>
609 ease
610 </td>
611 </tr>
612 <tr>
613 <td>
614 <em>Applies to:</em>
615 </td>
616 <td>
617 all elements, :before and :after pseudo elements
618 </td>
619 </tr>
620 <tr>
621 <td>
622 <em>Inherited:</em>
623 </td>
624 <td>
625 no
626 </td>
627 </tr>
628 <tr>
629 <td>
630 <em>Percentages:</em>
631 </td>
632 <td>
633 N/A
634 </td>
635 </tr>
636 <tr>
637 <td>
638 <em>Media:</em>
639 </td>
640 <td>
641 visual
642 </td>
643 </tr>
644 <tr>
645 <td>
646 <em>Computed value:</em>
647 </td>
648 <td>
649 Same as specified value.
650 </td>
651 </tr>
652 </tbody>
653 </table>
655 <p>
656 For a keyframed animation, the <code class="property">'animation-timing-function'</code> applies
657 between keyframes, not over the entire animation. For example, in the case of an ease-in-out timing function, an animation will ease in at the start of the keyframe and ease out at the end of the keyframe. A <code class="property">'animation-timing-function'</code> defined within a keyframe block applies to that keyframe, otherwise the timing function specified for the animation is used.
658 </p>
660 <!-- ======================================================================================================= -->
661 <h3>
662 The <code class="property">'animation-iteration-count'</code> Property
663 </h3>
664 <p>
665 The <code class="property">'animation-iteration-count'</code> property defines the number of times
666 an animation cycle is played. The default value is one, meaning the animation will play from
667 beginning to end once. A value of <code class="css">'infinite'</code> will cause the animation to
668 repeat forever. Non-integer numbers will cause the animation to end part-way through a cycle.
669 Negative values of <code class="property">'animation-iteration-count'</code> are invalid.
670 This property is often used with an <code class="property">'animation-direction'</code> value of
671 <code class="css">alternate</code>, which will cause the animation to play in reverse on alternate cycles.
672 </p>
673 <table class="propdef">
674 <tbody>
675 <tr>
676 <td>
677 <em>Name:</em>
678 </td>
679 <td>
680 <dfn id="animation-iteration-count">animation-iteration-count</dfn>
681 </td>
682 </tr>
683 <tr>
684 <td>
685 <em>Value:</em>
686 </td>
687 <td>
688 infinite | <number> [, infinite | <number>]*
689 </td>
690 </tr>
691 <tr>
692 <td>
693 <em>Initial:</em>
694 </td>
695 <td>
696 1
697 </td>
698 </tr>
699 <tr>
700 <td>
701 <em>Applies to:</em>
702 </td>
703 <td>
704 all elements, :before and :after pseudo elements
705 </td>
706 </tr>
707 <tr>
708 <td>
709 <em>Inherited:</em>
710 </td>
711 <td>
712 no
713 </td>
714 </tr>
715 <tr>
716 <td>
717 <em>Percentages:</em>
718 </td>
719 <td>
720 N/A
721 </td>
722 </tr>
723 <tr>
724 <td>
725 <em>Media:</em>
726 </td>
727 <td>
728 visual
729 </td>
730 </tr>
731 <tr>
732 <td>
733 <em>Computed value:</em>
734 </td>
735 <td>
736 Same as specified value.
737 </td>
738 </tr>
739 </tbody>
740 </table><!-- ======================================================================================================= -->
741 <h3>
742 The <code class="property">'animation-direction'</code> Property
743 </h3>
744 <p>
745 The <code class="property">'animation-direction'</code> property defines whether or not the animation should play in reverse on alternate cycles. If <code class="css">alternate</code> is specified, the animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction. When an animation is played in reverse the timing functions are also reversed. For example, when played in reverse an ease-in animation would appear to be an ease-out animation.
746 </p>
747 <table class="propdef">
748 <tbody>
749 <tr>
750 <td>
751 <em>Name:</em>
752 </td>
753 <td>
754 <dfn id="animation-direction">animation-direction</dfn>
755 </td>
756 </tr>
757 <tr>
758 <td>
759 <em>Value:</em>
760 </td>
761 <td>
762 normal | alternate [, normal | alternate]*
763 </td>
764 </tr>
765 <tr>
766 <td>
767 <em>Initial:</em>
768 </td>
769 <td>
770 normal
771 </td>
772 </tr>
773 <tr>
774 <td>
775 <em>Applies to:</em>
776 </td>
777 <td>
778 all elements, :before and :after pseudo elements
779 </td>
780 </tr>
781 <tr>
782 <td>
783 <em>Inherited:</em>
784 </td>
785 <td>
786 no
787 </td>
788 </tr>
789 <tr>
790 <td>
791 <em>Percentages:</em>
792 </td>
793 <td>
794 N/A
795 </td>
796 </tr>
797 <tr>
798 <td>
799 <em>Media:</em>
800 </td>
801 <td>
802 visual
803 </td>
804 </tr>
805 <tr>
806 <td>
807 <em>Computed value:</em>
808 </td>
809 <td>
810 Same as specified value.
811 </td>
812 </tr>
813 </tbody>
814 </table><!-- ======================================================================================================= -->
815 <h3>
816 The <code class="property">'animation-play-state'</code> Property
817 </h3>
819 <p>
820 The <code class="property">'animation-play-state'</code> property defines whether the animation is running or paused. A running animation can be paused by setting this property to <code class="css">'paused'</code>. To continue running a paused animation this property can be set to <code class="css">'running'</code>. A paused animation will continue to display the current value of the animation in a static state, as if the time of the animation is constant. When a paused animation is resumed, it restarts from the current value, not necessarily from the beginning of the animation.
821 </p>
822 <table class="propdef">
823 <tbody>
824 <tr>
825 <td>
826 <em>Name:</em>
827 </td>
828 <td>
829 <dfn id="animation-play-state">animation-play-state</dfn>
830 </td>
831 </tr>
832 <tr>
833 <td>
834 <em>Value:</em>
835 </td>
836 <td>
837 running | paused [, running | paused]*
838 </td>
839 </tr>
840 <tr>
841 <td>
842 <em>Initial:</em>
843 </td>
844 <td>
845 running
846 </td>
847 </tr>
848 <tr>
849 <td>
850 <em>Applies to:</em>
851 </td>
852 <td>
853 all elements, :before and :after pseudo elements
854 </td>
855 </tr>
856 <tr>
857 <td>
858 <em>Inherited:</em>
859 </td>
860 <td>
861 no
862 </td>
863 </tr>
864 <tr>
865 <td>
866 <em>Percentages:</em>
867 </td>
868 <td>
869 N/A
870 </td>
871 </tr>
872 <tr>
873 <td>
874 <em>Media:</em>
875 </td>
876 <td>
877 visual
878 </td>
879 </tr>
880 <tr>
881 <td>
882 <em>Computed value:</em>
883 </td>
884 <td>
885 Same as specified value.
886 </td>
887 </tr>
888 </tbody>
889 </table><!-- ======================================================================================================= -->
890 <h3>
891 The <code class="property">'animation-delay'</code> Property
892 </h3>
893 <p>
894 The <code class="property">'animation-delay'</code> property defines
895 when the animation will start. It allows an animation to begin
896 execution some time after it is applied. An <code
897 class="property">'animation-delay'</code> value of '0s' means the
898 animation will execute as soon as it is applied. Otherwise, the value
899 specifies an offset from the moment the animation is applied, and the
900 animation will delay execution by that offset.
901 </p>
902 <p>
903 If the value for <code class="property">'animation-delay'</code> is a
904 negative time offset then the animation will execute the moment it is
905 applied, but will appear to have begun execution at the specified
906 offset. That is, the animation will appear to begin part-way through
907 its play cycle. In the case where an animation has implied starting
908 values and a negative <code class="property">'animation-delay'</code>,
909 the starting values are taken from the moment the animation is applied.
910 </p>
911 <table class="propdef">
912 <tbody>
913 <tr>
914 <td>
915 <em>Name:</em>
916 </td>
917 <td>
918 <dfn id="animation-delay">animation-delay</dfn>
919 </td>
920 </tr>
921 <tr>
922 <td>
923 <em>Value:</em>
924 </td>
925 <td>
926 <time> [, <time>]*
927 </td>
928 </tr>
929 <tr>
930 <td>
931 <em>Initial:</em>
932 </td>
933 <td>
934 0s
935 </td>
936 </tr>
937 <tr>
938 <td>
939 <em>Applies to:</em>
940 </td>
941 <td>
942 all elements, :before and :after pseudo elements
943 </td>
944 </tr>
945 <tr>
946 <td>
947 <em>Inherited:</em>
948 </td>
949 <td>
950 no
951 </td>
952 </tr>
953 <tr>
954 <td>
955 <em>Percentages:</em>
956 </td>
957 <td>
958 N/A
959 </td>
960 </tr>
961 <tr>
962 <td>
963 <em>Media:</em>
964 </td>
965 <td>
966 visual
967 </td>
968 </tr>
969 <tr>
970 <td>
971 <em>Computed value:</em>
972 </td>
973 <td>
974 Same as specified value.
975 </td>
976 </tr>
977 </tbody>
978 </table><!-- ======================================================================================================= -->
979 <h3>
980 The <code class="property">'animation-fill-mode'</code> Property
981 </h3>
982 <p>
983 The <code class="property">'animation-fill-mode'</code> property defines
984 what values are applied by the animation outside the time it is executing.
985 By default, an animation will not affect property values between the
986 time it is applied (the <code class="property">'animation-name'</code> property is
987 set on an element) and the time it begins execution (which is determined by
988 the <code class="property">'animation-delay'</code> property). Also, by
989 default an animation does not affect property values after the animation
990 ends (determined by the <code class="property">'animation-duration'</code> property).
991 The value of <code class="property">'animation-fill-mode'</code> can
992 override this behavior.
993 </p>
994 <p>
995 If the value for <code class="property">'animation-fill-mode'</code> is
996 <code class="css">'backwards'</code>, then the animation will
997 apply the property values defined in its 0% or 'from' keyframe as soon
998 as the animation is applied, during the period defined by
999 <code class="property">'animation-delay'</code>.
1000 </p>
1001 <p>
1002 If the value for <code class="property">'animation-fill-mode'</code>
1003 is <code class="css">'forwards'</code>, then the animation will
1004 apply the property values defined in its last executing keyframe after
1005 the final iteration of the animation, until the animation style is
1006 removed. The last executing keyframe is the 'to' or '100%' keyframe,
1007 unless the animation has <code
1008 class="property">'animation-direction'</code> set to <code
1009 class="css">'alternate'</code> and both a finite and even
1010 iteration count, in which case it is the 'from' or '0%' keyframe.
1011 </p>
1012 <p>
1013 If the value for <code class="property">'animation-fill-mode'</code>
1014 is <code class="css">'both'</code>, then the animation will
1015 follow the rules for both 'forwards' and 'backwards'. That is, it will
1016 extend the animation properties in both directions.
1017 </p>
1018 <table class="propdef">
1019 <tbody>
1020 <tr>
1021 <td>
1022 <em>Name:</em>
1023 </td>
1024 <td>
1025 <dfn id="animation-fill-mode">animation-fill-mode</dfn>
1026 </td>
1027 </tr>
1028 <tr>
1029 <td>
1030 <em>Value:</em>
1031 </td>
1032 <td>
1033 none | forwards | backwards | both [, none | forwards | backwards | both]*
1034 </td>
1035 </tr>
1036 <tr>
1037 <td>
1038 <em>Initial:</em>
1039 </td>
1040 <td>
1041 none
1042 </td>
1043 </tr>
1044 <tr>
1045 <td>
1046 <em>Applies to:</em>
1047 </td>
1048 <td>
1049 all elements, :before and :after pseudo elements
1050 </td>
1051 </tr>
1052 <tr>
1053 <td>
1054 <em>Inherited:</em>
1055 </td>
1056 <td>
1057 no
1058 </td>
1059 </tr>
1060 <tr>
1061 <td>
1062 <em>Percentages:</em>
1063 </td>
1064 <td>
1065 N/A
1066 </td>
1067 </tr>
1068 <tr>
1069 <td>
1070 <em>Media:</em>
1071 </td>
1072 <td>
1073 visual
1074 </td>
1075 </tr>
1076 <tr>
1077 <td>
1078 <em>Computed value:</em>
1079 </td>
1080 <td>
1081 Same as specified value.
1082 </td>
1083 </tr>
1084 </tbody>
1085 </table><!-- ======================================================================================================= -->
1086 <h3>
1087 The <code class="property">'animation'</code> Shorthand Property
1088 </h3>
1089 <p>
1090 The <code class="property">'animation'</code> shorthand property
1091 combines seven of the animation properties into a single property.
1092 </p>
1093 <p>
1094 Note that order is important in this property. The first value that can be
1095 parsed as a time is assigned to the animation-duration. The second value that
1096 can be parsed as a time is assigned to animation-delay.
1097 </p>
1098 <p class="issue">
1099 An alternative proposal is to accept the font shorthand approach of
1100 using a "/" character between the values of the same type. eg. 2s/4s would
1101 mean a duration of 2 seconds and a delay of 4 seconds.
1102 </p>
1103 <table class="propdef">
1104 <tbody>
1105 <tr>
1106 <td>
1107 <em>Name:</em>
1108 </td>
1109 <td>
1110 <dfn id="animation">animation</dfn>
1111 </td>
1112 </tr>
1113 <tr>
1114 <td>
1115 <em>Value:</em>
1116 </td>
1117 <td>
1118 [<animation-name> ||
1119 <animation-duration> ||
1120 <animation-timing-function> ||
1121 <animation-delay> ||
1122 <animation-iteration-count> ||
1123 <animation-direction> ||
1124 <animation-fill-mode>]
1125 [, [<animation-name> ||
1126 <animation-duration> ||
1127 <animation-timing-function> ||
1128 <animation-delay> ||
1129 <animation-iteration-count> ||
1130 <animation-direction> ||
1131 <animation-fill-mode>] ]*
1132 </td>
1133 </tr>
1134 <tr>
1135 <td>
1136 <em>Initial:</em>
1137 </td>
1138 <td>
1139 see individual properties
1140 </td>
1141 </tr>
1142 <tr>
1143 <td>
1144 <em>Applies to:</em>
1145 </td>
1146 <td>
1147 all elements, :before and :after pseudo elements
1148 </td>
1149 </tr>
1150 <tr>
1151 <td>
1152 <em>Inherited:</em>
1153 </td>
1154 <td>
1155 no
1156 </td>
1157 </tr>
1158 <tr>
1159 <td>
1160 <em>Percentages:</em>
1161 </td>
1162 <td>
1163 N/A
1164 </td>
1165 </tr>
1166 <tr>
1167 <td>
1168 <em>Media:</em>
1169 </td>
1170 <td>
1171 visual
1172 </td>
1173 </tr>
1174 <tr>
1175 <td>
1176 <em>Computed value:</em>
1177 </td>
1178 <td>
1179 Same as specified value.
1180 </td>
1181 </tr>
1182 </tbody>
1183 </table><!-- ======================================================================================================= -->
1184 <h2>
1185 Animation Events
1186 </h2>
1187 <p>
1188 Several animation related events are available through the <a
1189 href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Event
1190 system</a>. The start and end of an animation, and the end of each
1191 iteration of an animation all generate DOM events. An element can have
1192 multiple properties being animated simultaneously. This can occur either
1193 with a single <code class="property">animation-name</code> value with
1194 keyframes containing multiple properties, or with multiple <code
1195 class="property">animation-name</code> values. For the purposes of
1196 events, each <code class="property">animation-name</code> specifies a
1197 single animation. Therefore an event will be generated for each <code
1198 class="property">animation-name</code> value and not necessarily for
1199 each property being animated.
1200 </p>
1201 <p>
1202 The time the animation has been running is sent with each event
1203 generated. This allows the event handler to determine the current
1204 iteration of a looping animation or the current position of an
1205 alternating animation. This time does not include any time the animation
1206 was in the <code>paused</code> play state.
1207 </p>
1208 <dl>
1209 <dt>
1210 <b>Interface <i><a id="Events-AnimationEvent" name='Events-AnimationEvent'>AnimationEvent</a></i></b>
1211 </dt>
1212 <dd>
1213 <p>
1214 The <code>AnimationEvent</code> interface provides specific contextual information associated with Animation events.
1215 </p>
1216 <dl>
1217 <dt>
1218 <br>
1219 <b>IDL Definition</b>
1220 </dt>
1221 <dd>
1222 <div class='idl-code'>
1223 <pre>
1224 interface AnimationEvent : Event {
1225 readonly attribute DOMString animationName;
1226 readonly attribute float elapsedTime;
1227 void initAnimationEvent(in DOMString typeArg,
1228 in boolean canBubbleArg,
1229 in boolean cancelableArg,
1230 in DOMString animationNameArg,
1231 in float elapsedTimeArg);
1232 };
1233 </pre>
1234 </div>
1235 </dd>
1236 <dt>
1237 <b>Attributes</b>
1238 </dt>
1239 <dd>
1240 <dl>
1241 <dt>
1242 <code class='attribute-name'><a id="Events-AnimationEvent-animationName" name='Events-AnimationEvent-animationName'>animationName</a></code> of type <code>DOMString</code>, readonly
1243 </dt>
1244 <dd>
1245 The value of the <code class="property">animation-name</code> property of the
1246 animation that fired the event.
1247 </dd>
1248 </dl>
1249 <dl>
1250 <dt>
1251 <code class='attribute-name'><a id="Events-AnimationEvent-elapsedTime" name='Events-AnimationEvent-elapsedTime'>elapsedTime</a></code> of type <code>float</code>, readonly
1252 </dt>
1253 <dd>
1254 The amount of time the animation has been running, in
1255 seconds, when this event fired, excluding any time the
1256 animation was paused. For an "animationstart" event, the
1257 elapsedTime is zero unless there was a negative value for
1258 <code class="property">animation-delay</code>, in which
1259 case the event will be fired with an elapsedTime of (-1 *
1260 delay).
1261 </dd>
1262 </dl>
1263 </dd>
1264 <dt>
1265 <b>Methods</b>
1266 </dt>
1267 <dd>
1268 <dl>
1269 <dt>
1270 <code class='method-name'><a id="Events-AnimationEvent-initAnimationEvent" name='Events-AnimtionEvent-initAnimationEvent'>initAnimationEvent</a></code>
1271 </dt>
1272 <dd>
1273 <div class='method'>
1274 The <code>initAnimationEvent</code> method is used to initialize the value of an <code>AnimationEvent</code> created through the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-DocumentEvent'><code>DocumentEvent</code></a> interface. This method may only be called before the <code>AnimationEvent</code> has been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
1275 <div class='parameters'>
1276 <b>Parameters</b>
1277 <div class='paramtable'>
1278 <dl>
1279 <dt>
1280 <code class='parameter-name'>typeArg</code> of type <code>DOMString</code>
1281 </dt>
1282 <dd>
1283 Specifies the event type.<br>
1284 </dd>
1285 <dt>
1286 <code class='parameter-name'>canBubbleArg</code> of type <code>boolean</code>
1287 </dt>
1288 <dd>
1289 Specifies whether or not the event can bubble.<br>
1290 </dd>
1291 <dt>
1292 <code class='parameter-name'>cancelableArg</code> of type <code>boolean</code>
1293 </dt>
1294 <dd>
1295 Specifies whether or not the event's default action can be prevented.
1296 </dd>
1297 <dt>
1298 <code class='parameter-name'>animationNameArg</code> of type <code>DOMString</code>
1299 </dt>
1300 <dd>
1301 Specifies the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>'s animation name.<br>
1302 </dd>
1303 <dt>
1304 <code class='parameter-name'>elapsedTimeArg</code> of type <code>float</code>
1305 </dt>
1306 <dd>
1307 Specifies the amount of time, in seconds, the animation has been running at the time of initialization.
1308 </dd>
1309 </dl>
1310 </div>
1311 </div><!-- parameters -->
1312 <div>
1313 <b>No Return Value</b>
1314 </div>
1315 <div>
1316 <b>No Exceptions</b>
1317 </div>
1318 </div><!-- method -->
1319 </dd>
1320 </dl>
1321 </dd>
1322 </dl>
1323 </dd>
1324 </dl>
1325 <p>
1326 The different types of Animation events that can occur are:
1327 </p>
1328 <dl>
1329 <dt>
1330 <b>animationstart</b>
1331 </dt>
1332 <dd>
1333 The 'animationstart' event occurs at the start of the animation. If there is an
1334 <code class="property">animation-delay</code> then this event will fire once the delay period
1335 has expired. A negative delay will cause the event to fire with an elapsedTime equal to
1336 the absolute value of the delay.
1337 <ul>
1338 <li>Bubbles: Yes
1339 </li>
1340 <li>Cancelable: Yes
1341 </li>
1342 <li>Context Info: animationName
1343 </li>
1344 </ul>
1345 </dd>
1346 <dt>
1347 <b>animationend</b>
1348 </dt>
1349 <dd>
1350 The 'animationend' event occurs when the animation finishes.
1351 <ul>
1352 <li>Bubbles: Yes
1353 </li>
1354 <li>Cancelable: Yes
1355 </li>
1356 <li>Context Info: animationName, elapsedTime
1357 </li>
1358 </ul>
1359 </dd>
1360 <dt>
1361 <b>animationiteration</b>
1362 </dt>
1363 <dd>
1364 The 'animationiteration' event occurs at the end of each iteration of an animation for which <code>animation-iteration-count</code> is greater than one. This event does not occur for animations with an iteration count of one.
1365 <ul>
1366 <li>Bubbles: Yes
1367 </li>
1368 <li>Cancelable: Yes
1369 </li>
1370 <li>Context Info: animationName, elapsedTime
1371 </li>
1372 </ul>
1373 </dd>
1374 </dl>
1375 <!-- ======================================================================================================= -->
1376 <h2>
1377 DOM Interfaces
1378 </h2>
1379 <p>
1380 CSS animation is exposed to the CSSOM through a pair of new interfaces
1381 describing the keyframes.
1382 </p>
1383 <dl>
1384 <dt>
1385 <b>Interface <i><a id="DOM-CSSRule" name='DOM-CSSRule'>CSSRule</a></i></b>
1386 </dt>
1387 <dd>
1388 <p>
1389 The following 2 rule types are added to the <code>CSSRule</code> interface. They provide identification for the new keyframe and keyframes rules.
1390 </p>
1391 <dl>
1393 <dt>
1394 <b>IDL Definition</b>
1395 </dt>
1396 <dd>
1397 <div class='idl-code'>
1398 <pre>
1399 interface CSSRule {
1400 ...
1401 const unsigned short KEYFRAMES_RULE = 7;
1402 const unsigned short KEYFRAME_RULE = 8;
1403 ...
1404 };</pre>
1405 </div>
1406 </dd> <!-- IDL -->
1407 </dl>
1408 </dd>
1410 <dt>
1411 <b>Interface <i><a id="DOM-CSSKeyframeRule" name='DOM-CSSKeyframeRule'>CSSKeyframeRule</a></i></b>
1412 </dt>
1413 <dd>
1414 <p>
1415 The <code>CSSKeyframeRule</code> interface represents the style rule for a single key.
1416 </p>
1417 <dl>
1418 <dt>
1419 <br>
1420 <b>IDL Definition</b>
1421 </dt>
1422 <dd>
1423 <div class='idl-code'>
1424 <pre>
1425 interface CSSKeyframeRule : CSSRule {
1426 attribute DOMString keyText;
1427 readonly attribute CSSStyleDeclaration style;
1428 };
1429 </pre>
1430 </div><br>
1431 </dd>
1432 <dt>
1433 <b>Attributes</b>
1434 </dt>
1435 <dd>
1436 <dl>
1437 <dt>
1438 <code class='attribute-name'><a id="DOM-CSSKeyframeRule-keyText" name='DOM-CSSKeyframeRule-keyText'>keyText</a></code> of type <code>DOMString</code>
1439 </dt>
1440 <dd>
1441 This attribute represents the key as the string representation of a floating point number between 0 and 1. If the value
1442 in the CSS style is <code>from</code> this value will be 0, and if the value in the CSS style is <code>to</code> this
1443 value will be 1.<br>
1444 </dd>
1445 </dl>
1446 </dd>
1447 <dd>
1448 <dl>
1449 <dt>
1450 <code class='attribute-name'><a id="DOM-CSSKeyframeRule-style" name='DOM-CSSKeyframeRule-style'>style</a></code> of type <code>CSSStyleDeclaration</code>
1451 </dt>
1452 <dd>
1453 This attribute represents the style associated with this keyframe.<br>
1454 </dd>
1455 </dl>
1456 </dd>
1457 <dt>
1458 <b>No Methods</b>
1459 </dt>
1460 </dl>
1461 </dd>
1462 </dl>
1463 <dl>
1464 <dt>
1465 <b>Interface <i><a id="DOM-CSSKeyframesRule" name='DOM-CSSKeyframesRule'>CSSKeyframesRule</a></i></b>
1466 </dt>
1467 <dd>
1468 <p>
1469 The <code>CSSKeyframesRule</code> interface represents a complete set of keyframes for a single animation.
1470 </p>
1471 <dl>
1472 <dt>
1473 <br>
1474 <b>IDL Definition</b>
1475 </dt>
1476 <dd>
1477 <div class='idl-code'>
1478 <pre>
1479 interface CSSKeyframesRule : CSSRule {
1480 attribute DOMString name;
1481 readonly attribute CSSRuleList cssRules;
1483 void appendRule(in DOMString rule);
1484 void deleteRule(in DOMString key);
1485 CSSKeyframeRule findRule(in DOMString key);
1486 };
1487 </pre>
1488 </div><br>
1489 </dd>
1490 <dt>
1491 <b>Attributes</b>
1492 </dt>
1493 <dd>
1494 <dl>
1495 <dt>
1496 <code class='attribute-name'><a id="DOM-CSSKeyframesRule-name" name='DOM-CSSKeyframesRule-name'>name</a></code> of type <code>DOMString</code>
1497 </dt>
1498 <dd>
1499 This attribute is the name of the keyframes, used by the <code>animation-name</code> property.<br>
1500 </dd>
1501 </dl>
1502 </dd>
1503 <dd>
1504 <dl>
1505 <dt>
1506 <code class='attribute-name'><a id="DOM-CSSKeyframeRules-cssRules" name='DOM-CSSKeyframeRules-cssRules'>cssRules</a></code> of type <code>CSSRuleList</code>
1507 </dt>
1508 <dd>
1509 This attribute gives access to the keyframes in the list.<br>
1510 </dd>
1511 </dl>
1512 </dd>
1513 <dt>
1514 <b>Methods</b>
1515 <dd>
1516 <dl>
1517 <!-- ======================================================================================================= -->
1518 <dt>
1519 <code class='method-name'><a id="DOM-CSSKeyframesRule-appendRule" name='DOM-CSSKeyframesRule-appendRule'>appendRule</a></code>
1520 </dt>
1521 <dd>
1522 <div class='method'>
1523 The <code>appendRule</code> method appends the passed CSSKeyframeRule into the list at the passed key.
1524 <div class='parameters'>
1525 <b>Parameters</b>
1526 <div class='paramtable'>
1527 <dl>
1528 <dt>
1529 <code class='parameter-name'>rule</code> of type <code>DOMString</code>
1530 </dt>
1531 <dd>
1532 The rule to be appended, expressed in the same syntax as one entry in the
1533 <code>@keyframes</code> rule.
1534 </dd>
1535 </dl>
1536 </div>
1537 </div><!-- parameters -->
1538 <div class='return-value'>
1539 <b>No Return Value</b>
1540 </div>
1541 <div>
1542 <b>No Exceptions</b>
1543 </div>
1544 </div><!-- ======================================================================================================= -->
1545 </dd>
1546 <dt>
1547 <code class='method-name'><a id="DOM-CSSKeyframesRule-deleteRule" name='DOM-CSSKeyframesRule-deleteRule'>deleteRule</a></code>
1548 </dt>
1549 <dd>
1550 <div class='method'>
1551 The <code>deleteRule</code> method deletes the CSSKeyframeRule with the passed key. If a rule with this key
1552 does not exist, the method does nothing.
1553 <div class='parameters'>
1554 <b>Parameters</b>
1555 <div class='paramtable'>
1556 <dl>
1557 <dt>
1558 <code class='parameter-name'>key</code> of type <code>DOMString</code>
1559 </dt>
1560 <dd>
1561 The key which describes the rule to be deleted. The key must
1562 resolve to a number between 0 and 1, or the rule is ignored.<br>
1563 </dd>
1564 </dl>
1565 </div>
1566 </div><!-- parameters -->
1567 <div class='return-value'>
1568 <b>No Return Value</b>
1569 </div>
1570 <div>
1571 <b>No Exceptions</b>
1572 </div>
1573 </div><!-- ======================================================================================================= -->
1574 </dd>
1575 <dt>
1576 <code class='method-name'><a id="DOM-CSSKeyframesRule-findRule" name='DOM-CSSKeyframesRule-findRule'>findRule</a></code>
1577 </dt>
1578 <dd>
1579 <div class='method'>
1580 The <code>findRule</code> method returns the rule with a key matching the passed key. If no such rule
1581 exists, a null value is returned.
1582 <div class='parameters'>
1583 <b>Parameters</b>
1584 <div class='paramtable'>
1585 <dl>
1586 <dt>
1587 <code class='parameter-name'>key</code> of type <code>DOMString</code>
1588 </dt>
1589 <dd>
1590 The key which described the rule to find. The key must
1591 resolve to a number between 0 and 1, or the rule is ignored.<br>
1592 </dd>
1593 </dl>
1594 </div>
1595 </div><!-- parameters -->
1596 <div class='return-value'>
1597 <b>Return Value</b>
1598 <div class='returnvalue'>
1599 <dl>
1600 <dt>
1601 <code>CSSKeyframeRule</code>
1602 </dt>
1603 <dd>
1604 The found rule.<br>
1605 </dd>
1606 </dl>
1607 </div>
1608 </div>
1609 <div>
1610 <b>No Exceptions</b>
1611 </div>
1612 </div><!-- ======================================================================================================= -->
1613 </dd>
1614 </dl><!-- method -->
1615 </dd>
1616 </dt>
1617 </dl>
1618 </dd>
1619 </dl>
1621 <h2>References</h2>
1623 <h3 class="no-num">Normative references</h3>
1624 <!--normative-->
1626 <h3 class="no-num">Other references</h3>
1627 <!--informative-->
1631 <h2 class="no-num">Property index</h2>
1632 <!-- properties -->
1636 <h2 class="no-num" id="index">Index</h2>
1637 <!--index-->
1639 </body>
1640 </html>
1641 <!-- Keep this comment at the end of the file
1642 Local variables:
1643 mode: sgml
1644 sgml-default-doctype-name:"html"
1645 sgml-minimize-attributes:t
1646 End:
1647 -->