css3-animations/Overview.src.html

Sat, 17 Dec 2011 04:37:18 +0000

author
L. David Baron <dbaron@dbaron.org>
date
Sat, 17 Dec 2011 04:37:18 +0000
changeset 4123
7435096f75b2
parent 4122
2579c1842a7c
child 4174
419909ea4220
permissions
-rw-r--r--

Further tweak whitespace in keyframes grammar, both to add more places allowed whitespace was missing, and to follow the convention that productions allow whitespace at their end but not their start.

     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       <span class="prop-name">'animation-name'</span> that references a valid
   154       keyframes rule. Once an animation has started it continues until it ends
   155       or the <span class="prop-name">'animation-name'</span> 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       <span class="prop-name">'animation-name'</span> 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       <span class="prop-name">'animation-duration'</span>,
   169       <span class="prop-name">'animation-iteration-count'</span> and
   170       <span class="prop-name">'animation-fill-mode'</span> 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 <span
   209         class="prop-name">@keyframes</span> rule consists of the keyword
   210         "@keyframes", followed by an identifier giving a name for the animation
   211         (which will be referenced using <span
   212         class="prop-name">'animation-name'</span>), followed by a set of style
   213         rules (delimited by curly braces).
   214       </p>
   215       <p>
   216         The <i>keyframe selector</i> for a keyframe style rule consists of a
   217         comma-separated list of percentage values or the keywords 'from' or
   218         'to'. The selector is used to specify the percentage along the duration
   219         of the animation that the keyframe represents. The
   220         keyframe itself is specified by the block of property values declared on
   221         the selector. The keyword 'from' is equivalent to the value 0%. The
   222         keyword 'to' is equivalent to the value 100%. Note that the percentage
   223         unit specifier must be used on percentage values. Therefore, "0" is an
   224         invalid keyframe selector.
   225       </p>
   226       <p>
   227         If a 0% or "from" keyframe is not specified, then the user agent
   228         constructs a 0% keyframe using the computed values of the properties
   229         being animated. If a 100% or "to" keyframe is not specified, then the user agent
   230         constructs a 100% keyframe using the computed values of the properties
   231         being animated.
   232       </p>
   233       <p>
   234         The <i>keyframe declaration</i> for a keyframe rule consists of
   235         properties and values. Properties that are unable to be
   236         animated are ignored in these rules, with the exception of <span
   237         class="prop-name">animation-timing-function'</span>, the behavior 
   238         of which is described below.
   239       </p>
   240       <p class="note">
   241           NOTE: describe what happens if a property is not present in all keyframes.
   242       </p>
   243       <p>
   244         The @keyframes rule that is used by an animation will be the last one encountered in sorted rules order
   245         that matches the name of the animation specified by the <span class="prop-name">'animation-name'</span> property.
   246         <span class="prop-name">@keyframes</span> rules do not cascade;
   247         therefore an animation will never derive keyframes from more than one <span class="prop-name">@keyframes</span> rule.
   248       </p>
   249       <p>
   250         To determine the set of keyframes, all of the values in selectors are sorted in increasing order by time.
   251         If there are any duplicates, then the last keyframe specified inside the <span class="prop-name">@keyframes</span> rule
   252         will be used to provide the keyframe information for that time. There is no cascading within a
   253         <span class="prop-name">@keyframes</span> rule if multiple keyframes specify the same keyframe selector values.
   254       </p>
   255       <div class="example">
   256         <p style="display:none">
   257           Example(s):
   258         </p>
   259         <pre>
   260   @keyframes wobble {
   262     0% {
   263       left: 100px;
   264     }
   266     40% {
   267       left: 150px;
   268     }
   270     60% {
   271       left: 75px;
   272     }
   274     100% {
   275       left: 100px;
   276     }
   278   }
   280   </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.
   281         <div class="figure">
   282           <img src="animation1.png" alt="">
   283         </div>
   284         <p class="caption">
   285           Animations states specified by keyframes
   286         </p>
   287       </div>
   289       <p>
   290         The following is the grammar for the keyframes rule.
   291       </p>
   293       <pre>
   295         keyframes-rule: KEYFRAMES_SYM S+ IDENT S* '{' S* keyframes-blocks '}' S*;
   297         keyframes-blocks: [ keyframe-selector '{' S* declaration? [ ';' S* declaration? ]* '}' S* ]* ;
   299         keyframe-selector: [ FROM_SYM | TO_SYM | PERCENTAGE ] S* [ ',' S* [ FROM_SYM | TO_SYM | PERCENTAGE ] S* ]*;
   301         @{K}{E}{Y}{F}{R}{A}{M}{E}{S}   {return KEYFRAMES_SYM;}
   302         {F}{R}{O}{M}                   {return FROM_SYM;}
   303         {T}{O}                         {return TO_SYM;}
   304       </pre>
   305       <!-- ======================================================================================================= -->
   306       <h3>
   307         Timing functions for keyframes
   308       </h3>
   309       <p>
   310         A keyframe style rule may also declare the timing function that is to be used as the animation moves to the next keyframe.
   311       </p>
   312       <div class="example">
   313         <p style="display:none">
   314           Example(s):
   315         </p>
   316         <pre>
   317   @keyframes bounce {
   319     from {
   320       top: 100px;
   321       animation-timing-function: ease-out;
   322     }
   324     25% {
   325       top: 50px;
   326       animation-timing-function: ease-in;
   327     }
   329     50% {
   330       top: 100px;
   331       animation-timing-function: ease-out;
   332     }
   334     75% {
   335       top: 75px;
   336       animation-timing-function: ease-in;
   337     }
   339     to {
   340       top: 100px;
   341     }
   343   }
   345   </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
   346       </div>
   347       <p>
   348         See <a href="#animation-timing-function_tag">the <span class="prop-name">'animation-timing-function'</span> property</a> for more information.
   349       </p><!-- ======================================================================================================= -->
   351       <!-- ======================================================================================================= -->
   352       <h3>
   353         The <span class="prop-name">'animation-name'</span> Property
   354       </h3>
   355       <p>
   356         The <span class="prop-name">'animation-name'</span> property defines a
   357         list of animations that apply. Each name is used to select the keyframe at-rule
   358         that provides the property values for the animation. If the name does
   359         not match any keyframe at-rule, there are no properties to be animated
   360         and the animation will not execute. Furthermore, if the animation name
   361         is 'none' then there will be no animation. This can be used to override
   362         any animations coming from the cascade. If animations are attempting to
   363         modify the same property, then the animation closest to the end of the
   364         list of names wins.
   365       </p>
   366       <p>
   367         Each animation listed by name should have a corresponding value
   368         for the other animation properties listed below. In the case where the
   369         other properties do not have lists of the correct length, their values
   370         are repeated to form a list with the same number of entries as
   371         <span class="prop-name">'animation-name'</span>.
   372       </p>
   373       <table class="propdef">
   374         <tbody>
   375           <tr>
   376             <td>
   377               <em>Name:</em>
   378             </td>
   379             <td>
   380               <dfn id="animation-name">animation-name</dfn>
   381             </td>
   382           </tr>
   383           <tr>
   384             <td>
   385               <em>Value:</em>
   386             </td>
   387             <td>
   388               none | IDENT [, none | IDENT ]*
   389             </td>
   390           </tr>
   391           <tr>
   392             <td>
   393               <em>Initial:</em>
   394             </td>
   395             <td>
   396               none
   397             </td>
   398           </tr>
   399           <tr>
   400             <td>
   401               <em>Applies&nbsp;to:</em>
   402             </td>
   403             <td>
   404               all elements, :before and :after pseudo elements
   405             </td>
   406           </tr>
   407           <tr>
   408             <td>
   409               <em>Inherited:</em>
   410             </td>
   411             <td>
   412               no
   413             </td>
   414           </tr>
   415           <tr>
   416             <td>
   417               <em>Percentages:</em>
   418             </td>
   419             <td>
   420               N/A
   421             </td>
   422           </tr>
   423           <tr>
   424             <td>
   425               <em>Media:</em>
   426             </td>
   427             <td>
   428               visual
   429             </td>
   430           </tr>
   431           <tr>
   432             <td>
   433               <em>Computed value:</em>
   434             </td>
   435             <td>
   436               Same as specified value.
   437             </td>
   438           </tr>
   439         </tbody>
   440       </table>
   442       <!--
   443       <p>
   444         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 <span class="prop-name">opacity</span> will add together and animations on <span class="prop-name">transform</span> will have their transformation matrices multiplied.
   445       </p>
   446       <div class="example">
   447         <p style="display:none">
   448           Example(s):
   449         </p>
   450         <pre>
   451         @keyframes 'border-bloat' {
   452           from {
   453             border-width: 0;
   454           }
   455           to {
   456             border-width: 10px;
   457           }
   458         }
   460         @keyframes 'border-diet' {
   461           from {
   462             border-width: 4px;
   463           }
   464           to {
   465             border-width: 2px;
   466           }
   467         }
   469         div {
   470           animation-name: 'border-bloat', 'border-diet';
   471           animation-duration: 10s, 4s;
   472         }
   473       </pre>
   474       <p>
   475       The above example has two animations executing on the same property, <span class="prop-name">border-width</span>. The animations are additive. That is, the 
   476       resulting value for the property will be the addition of the values from the
   477       two animations.
   478       </p>
   479       <p>
   480         At time '0s' the element's border will be 4px wide (0px from 'border-bloat' plus 4px from 'border-diet'). 
   481         At time '4s' the element's border will be 6px wide (4px from 'border-bloat' plus 2px from 'border-diet').
   482         At time '10s' the element's border will be 10px wide (10px from 'border-bloat' and no addition from
   483         'border-diet' as it is no longer executing).
   484       </p>
   485     </div>
   486   -->
   489       <!-- ======================================================================================================= -->
   490       <h3>
   491         The <span class="prop-name">'animation-duration'</span> Property
   492       </h3>
   493       <p>
   494         The <span class="prop-name">'animation-duration'</span> property defines the length of time that an animation takes to complete one cycle.
   495       </p>
   496       <table class="propdef">
   497         <tbody>
   498           <tr>
   499             <td>
   500               <em>Name:</em>
   501             </td>
   502             <td>
   503               <dfn id="animation-duration">animation-duration</dfn>
   504             </td>
   505           </tr>
   506           <tr>
   507             <td>
   508               <em>Value:</em>
   509             </td>
   510             <td>
   511               &lt;time&gt; [, &lt;time&gt;]*
   512             </td>
   513           </tr>
   514           <tr>
   515             <td>
   516               <em>Initial:</em>
   517             </td>
   518             <td>
   519               0s
   520             </td>
   521           </tr>
   522           <tr>
   523             <td>
   524               <em>Applies&nbsp;to:</em>
   525             </td>
   526             <td>
   527               all elements, :before and :after pseudo elements
   528             </td>
   529           </tr>
   530           <tr>
   531             <td>
   532               <em>Inherited:</em>
   533             </td>
   534             <td>
   535               no
   536             </td>
   537           </tr>
   538           <tr>
   539             <td>
   540               <em>Percentages:</em>
   541             </td>
   542             <td>
   543               N/A
   544             </td>
   545           </tr>
   546           <tr>
   547             <td>
   548               <em>Media:</em>
   549             </td>
   550             <td>
   551               visual
   552             </td>
   553           </tr>
   554           <tr>
   555             <td>
   556               <em>Computed value:</em>
   557             </td>
   558             <td>
   559               Same as specified value.
   560             </td>
   561           </tr>
   562         </tbody>
   563       </table>
   565       <p>
   566         By default the value is '0s', meaning that the animation cycle is
   567         immediate. A negative value for <span
   568         class="prop-name">animation-duration</span> is treated as '0s'. In this
   569         case <span class="prop-name">animation-fill-mode</span> still applies,
   570         so an animation that fills backwards will show the value of the 0%
   571         keyframe during any delay period, and an animation that fill forwards
   572         will retain the value specified at the 100% keyframe, even if the
   573         animation was instantaneous. Also, animation events are still fired.
   574       </p>
   576       <!-- ======================================================================================================= -->
   577       <h3 id="animation-timing-function_tag">
   578         The <span class="prop-name">'animation-timing-function'</span> Property
   579       </h3>
   580       <p>
   581         The <span class="prop-name">'animation-timing-function'</span> property describes how the animation will progress over one cycle of its duration. See the <span class="prop-name">'transition-timing-function'</span> property [[!CSS3-TRANSITIONS]] for a complete description of timing function calculation.
   582       </p>
   583       <table class="propdef">
   584         <tbody>
   585           <tr>
   586             <td>
   587               <em>Name:</em>
   588             </td>
   589             <td>
   590               <dfn id="animation-timing-function">animation-timing-function</dfn>
   591             </td>
   592           </tr>
   593           <tr>
   594             <td>
   595               <em>Value:</em>
   596             </td>
   597             <td>
   598               ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(&lt;number&gt;[, start | end ]) | cubic-bezier(&lt;number&gt;, &lt;number&gt;, &lt;number&gt;, &lt;number&gt;) [, ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(&lt;number&gt;[, start | end ]) | cubic-bezier(&lt;number&gt;, &lt;number&gt;, &lt;number&gt;, &lt;number&gt;)]*
   599             </td>
   600           </tr>
   601           <tr>
   602             <td>
   603               <em>Initial:</em>
   604             </td>
   605             <td>
   606               ease
   607             </td>
   608           </tr>
   609           <tr>
   610             <td>
   611               <em>Applies&nbsp;to:</em>
   612             </td>
   613             <td>
   614               all elements, :before and :after pseudo elements
   615             </td>
   616           </tr>
   617           <tr>
   618             <td>
   619               <em>Inherited:</em>
   620             </td>
   621             <td>
   622               no
   623             </td>
   624           </tr>
   625           <tr>
   626             <td>
   627               <em>Percentages:</em>
   628             </td>
   629             <td>
   630               N/A
   631             </td>
   632           </tr>
   633           <tr>
   634             <td>
   635               <em>Media:</em>
   636             </td>
   637             <td>
   638               visual
   639             </td>
   640           </tr>
   641           <tr>
   642             <td>
   643               <em>Computed value:</em>
   644             </td>
   645             <td>
   646               Same as specified value.
   647             </td>
   648           </tr>
   649         </tbody>
   650       </table>
   652       <p>
   653         For a keyframed animation, the <span class="prop-name">'animation-timing-function'</span> applies
   654         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 <span class="prop-name">'animation-timing-function'</span> defined within a keyframe block applies to that keyframe, otherwise the timing function specified for the animation is used.
   655       </p>
   657       <!-- ======================================================================================================= -->
   658       <h3>
   659         The <span class="prop-name">'animation-iteration-count'</span> Property
   660       </h3>
   661       <p>
   662         The <span class="prop-name">'animation-iteration-count'</span> property defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once. A value of <span class="prop-value">'infinite'</span> will cause the animation to repeat forever. Non-integer numbers will cause the animation to end part-way through a cycle. Negative values of <span class="prop-name">'animation-iteration-count'</span> are invalid. This property is often used with an <span class="prop-name">'animation-direction'</span> value of <span class="prop-value">'alternate'</span>, which will cause the animation to play in reverse on alternate cycles.
   663       </p>
   664       <table class="propdef">
   665         <tbody>
   666           <tr>
   667             <td>
   668               <em>Name:</em>
   669             </td>
   670             <td>
   671               <dfn id="animation-iteration-count">animation-iteration-count</dfn>
   672             </td>
   673           </tr>
   674           <tr>
   675             <td>
   676               <em>Value:</em>
   677             </td>
   678             <td>
   679               infinite | &lt;number&gt; [, infinite | &lt;number&gt;]*
   680             </td>
   681           </tr>
   682           <tr>
   683             <td>
   684               <em>Initial:</em>
   685             </td>
   686             <td>
   687               1
   688             </td>
   689           </tr>
   690           <tr>
   691             <td>
   692               <em>Applies&nbsp;to:</em>
   693             </td>
   694             <td>
   695               all elements, :before and :after pseudo elements
   696             </td>
   697           </tr>
   698           <tr>
   699             <td>
   700               <em>Inherited:</em>
   701             </td>
   702             <td>
   703               no
   704             </td>
   705           </tr>
   706           <tr>
   707             <td>
   708               <em>Percentages:</em>
   709             </td>
   710             <td>
   711               N/A
   712             </td>
   713           </tr>
   714           <tr>
   715             <td>
   716               <em>Media:</em>
   717             </td>
   718             <td>
   719               visual
   720             </td>
   721           </tr>
   722           <tr>
   723             <td>
   724               <em>Computed value:</em>
   725             </td>
   726             <td>
   727               Same as specified value.
   728             </td>
   729           </tr>
   730         </tbody>
   731       </table><!-- ======================================================================================================= -->
   732       <h3>
   733         The <span class="prop-name">'animation-direction'</span> Property
   734       </h3>
   735       <p>
   736         The <span class="prop-name">'animation-direction'</span> property defines whether or not the animation should play in reverse on alternate cycles. If <span class="prop-value">'alternate'</span> 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.
   737       </p>
   738       <table class="propdef">
   739         <tbody>
   740           <tr>
   741             <td>
   742               <em>Name:</em>
   743             </td>
   744             <td>
   745               <dfn id="animation-direction">animation-direction</dfn>
   746             </td>
   747           </tr>
   748           <tr>
   749             <td>
   750               <em>Value:</em>
   751             </td>
   752             <td>
   753               normal | alternate [, normal | alternate]*
   754             </td>
   755           </tr>
   756           <tr>
   757             <td>
   758               <em>Initial:</em>
   759             </td>
   760             <td>
   761               normal
   762             </td>
   763           </tr>
   764           <tr>
   765             <td>
   766               <em>Applies&nbsp;to:</em>
   767             </td>
   768             <td>
   769               all elements, :before and :after pseudo elements
   770             </td>
   771           </tr>
   772           <tr>
   773             <td>
   774               <em>Inherited:</em>
   775             </td>
   776             <td>
   777               no
   778             </td>
   779           </tr>
   780           <tr>
   781             <td>
   782               <em>Percentages:</em>
   783             </td>
   784             <td>
   785               N/A
   786             </td>
   787           </tr>
   788           <tr>
   789             <td>
   790               <em>Media:</em>
   791             </td>
   792             <td>
   793               visual
   794             </td>
   795           </tr>
   796           <tr>
   797             <td>
   798               <em>Computed value:</em>
   799             </td>
   800             <td>
   801               Same as specified value.
   802             </td>
   803           </tr>
   804         </tbody>
   805       </table><!-- ======================================================================================================= -->
   806       <h3>
   807         The <span class="prop-name">'animation-play-state'</span> Property
   808       </h3>
   810       <p>
   811         The <span class="prop-name">'animation-play-state'</span> property defines whether the animation is running or paused. A running animation can be paused by setting this property to <span class="prop-value">'paused'</span>. To continue running a paused animation this property can be set to <span class="prop-value">'running'</span>. 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.
   812       </p>
   813       <table class="propdef">
   814         <tbody>
   815           <tr>
   816             <td>
   817               <em>Name:</em>
   818             </td>
   819             <td>
   820               <dfn id="animation-play-state">animation-play-state</dfn>
   821             </td>
   822           </tr>
   823           <tr>
   824             <td>
   825               <em>Value:</em>
   826             </td>
   827             <td>
   828               running | paused [, running | paused]*
   829             </td>
   830           </tr>
   831           <tr>
   832             <td>
   833               <em>Initial:</em>
   834             </td>
   835             <td>
   836               running
   837             </td>
   838           </tr>
   839           <tr>
   840             <td>
   841               <em>Applies&nbsp;to:</em>
   842             </td>
   843             <td>
   844               all elements, :before and :after pseudo elements
   845             </td>
   846           </tr>
   847           <tr>
   848             <td>
   849               <em>Inherited:</em>
   850             </td>
   851             <td>
   852               no
   853             </td>
   854           </tr>
   855           <tr>
   856             <td>
   857               <em>Percentages:</em>
   858             </td>
   859             <td>
   860               N/A
   861             </td>
   862           </tr>
   863           <tr>
   864             <td>
   865               <em>Media:</em>
   866             </td>
   867             <td>
   868               visual
   869             </td>
   870           </tr>
   871           <tr>
   872             <td>
   873               <em>Computed value:</em>
   874             </td>
   875             <td>
   876               Same as specified value.
   877             </td>
   878           </tr>
   879         </tbody>
   880       </table><!-- ======================================================================================================= -->
   881       <h3>
   882         The <span class="prop-name">'animation-delay'</span> Property
   883       </h3>
   884       <p>
   885         The <span class="prop-name">'animation-delay'</span> property defines
   886         when the animation will start. It allows an animation to begin
   887         execution some time after it is applied. An <span
   888         class="prop-name">'animation-delay'</span> value of '0s' means the
   889         animation will execute as soon as it is applied. Otherwise, the value
   890         specifies an offset from the moment the animation is applied, and the
   891         animation will delay execution by that offset.
   892       </p>
   893       <p>
   894         If the value for <span class="prop-name">'animation-delay'</span> is a
   895         negative time offset then the animation will execute the moment it is
   896         applied, but will appear to have begun execution at the specified
   897         offset. That is, the animation will appear to begin part-way through
   898         its play cycle. In the case where an animation has implied starting
   899         values and a negative <span
   900         class="prop-name">'animation-delay'</span>, the starting values are
   901         taken from the moment the animation is applied.
   902       </p>
   903       <table class="propdef">
   904         <tbody>
   905           <tr>
   906             <td>
   907               <em>Name:</em>
   908             </td>
   909             <td>
   910               <dfn id="animation-delay">animation-delay</dfn>
   911             </td>
   912           </tr>
   913           <tr>
   914             <td>
   915               <em>Value:</em>
   916             </td>
   917             <td>
   918               &lt;time&gt; [, &lt;time&gt;]*
   919             </td>
   920           </tr>
   921           <tr>
   922             <td>
   923               <em>Initial:</em>
   924             </td>
   925             <td>
   926               0s
   927             </td>
   928           </tr>
   929           <tr>
   930             <td>
   931               <em>Applies&nbsp;to:</em>
   932             </td>
   933             <td>
   934               all elements, :before and :after pseudo elements
   935             </td>
   936           </tr>
   937           <tr>
   938             <td>
   939               <em>Inherited:</em>
   940             </td>
   941             <td>
   942               no
   943             </td>
   944           </tr>
   945           <tr>
   946             <td>
   947               <em>Percentages:</em>
   948             </td>
   949             <td>
   950               N/A
   951             </td>
   952           </tr>
   953           <tr>
   954             <td>
   955               <em>Media:</em>
   956             </td>
   957             <td>
   958               visual
   959             </td>
   960           </tr>
   961           <tr>
   962             <td>
   963               <em>Computed value:</em>
   964             </td>
   965             <td>
   966               Same as specified value.
   967             </td>
   968           </tr>
   969         </tbody>
   970       </table><!-- ======================================================================================================= -->
   971       <h3>
   972         The <span class="prop-name">'animation-fill-mode'</span> Property
   973       </h3>
   974       <p>
   975         The <span class="prop-name">'animation-fill-mode'</span> property defines
   976         what values are applied by the animation outside the time it is executing.
   977         By default, an animation will not affect property values between the
   978         time it is applied (the <span class="prop-name">'animation-name'</span> property is
   979         set on an element) and the time it begins execution (which is determined by
   980         the <span class="prop-name">'animation-delay'</span> property). Also, by
   981         default an animation does not affect property values after the animation
   982         ends (determined by the <span class="prop-name">'animation-duration'</span> property).
   983         The value of <span class="prop-name">'animation-fill-mode'</span> can
   984         override this behavior.
   985       </p>
   986       <p>
   987         If the value for <span class="prop-name">'animation-fill-mode'</span> is
   988         <span class="prop-value">'backwards'</span>, then the animation will
   989         apply the property values defined in its 0% or 'from' keyframe as soon
   990         as the animation is applied, during the period defined by
   991         <span class="prop-name">'animation-delay'</span>.
   992       </p>
   993       <p>
   994         If the value for <span class="prop-name">'animation-fill-mode'</span>
   995         is <span class="prop-value">'forwards'</span>, then the animation will
   996         apply the property values defined in its last executing keyframe after
   997         the final iteration of the animation, until the animation style is
   998         removed. The last executing keyframe is the 'to' or '100%' keyframe,
   999         unless the animation has <span
  1000         class="prop-name">'animation-direction'</span> set to <span
  1001         class="prop-value">'alternate'</span> and both a finite and even
  1002         iteration count, in which case it is the 'from' or '0%' keyframe.
  1003       </p>
  1004       <p>
  1005         If the value for <span class="prop-name">'animation-fill-mode'</span>
  1006         is <span class="prop-value">'both'</span>, then the animation will
  1007         follow the rules for both 'forwards' and 'backwards'. That is, it will
  1008         extend the animation properties in both directions.
  1009       </p>
  1010       <table class="propdef">
  1011         <tbody>
  1012           <tr>
  1013             <td>
  1014               <em>Name:</em>
  1015             </td>
  1016             <td>
  1017               <dfn id="animation-fill-mode">animation-fill-mode</dfn>
  1018             </td>
  1019           </tr>
  1020           <tr>
  1021             <td>
  1022               <em>Value:</em>
  1023             </td>
  1024             <td>
  1025               none | forwards | backwards | both [, none | forwards | backwards | both]*
  1026             </td>
  1027           </tr>
  1028           <tr>
  1029             <td>
  1030               <em>Initial:</em>
  1031             </td>
  1032             <td>
  1033               none
  1034             </td>
  1035           </tr>
  1036           <tr>
  1037             <td>
  1038               <em>Applies&nbsp;to:</em>
  1039             </td>
  1040             <td>
  1041               all elements, :before and :after pseudo elements
  1042             </td>
  1043           </tr>
  1044           <tr>
  1045             <td>
  1046               <em>Inherited:</em>
  1047             </td>
  1048             <td>
  1049               no
  1050             </td>
  1051           </tr>
  1052           <tr>
  1053             <td>
  1054               <em>Percentages:</em>
  1055             </td>
  1056             <td>
  1057               N/A
  1058             </td>
  1059           </tr>
  1060           <tr>
  1061             <td>
  1062               <em>Media:</em>
  1063             </td>
  1064             <td>
  1065               visual
  1066             </td>
  1067           </tr>
  1068           <tr>
  1069             <td>
  1070               <em>Computed value:</em>
  1071             </td>
  1072             <td>
  1073               Same as specified value.
  1074             </td>
  1075           </tr>
  1076         </tbody>
  1077       </table><!-- ======================================================================================================= -->
  1078       <h3>
  1079         The <span class="prop-name">'animation'</span> Shorthand Property
  1080       </h3>
  1081       <p>
  1082         The <span class="prop-name">'animation'</span> shorthand property
  1083         combines seven of the animation properties into a single property.
  1084       </p>
  1085       <p>
  1086         Note that order is important in this property. The first value that can be
  1087         parsed as a time is assigned to the animation-duration. The second value that
  1088         can be parsed as a time is assigned to animation-delay.
  1089       </p>
  1090       <p class="issue">
  1091         An alternative proposal is to accept the font shorthand approach of
  1092         using a "/" character between the values of the same type. eg. 2s/4s would
  1093         mean a duration of 2 seconds and a delay of 4 seconds.
  1094       </p>
  1095       <table class="propdef">
  1096         <tbody>
  1097           <tr>
  1098             <td>
  1099               <em>Name:</em>
  1100             </td>
  1101             <td>
  1102               <dfn id="animation">animation</dfn>
  1103             </td>
  1104           </tr>
  1105           <tr>
  1106             <td>
  1107               <em>Value:</em>
  1108             </td>
  1109             <td>
  1110               [&lt;animation-name&gt; || 
  1111               &lt;animation-duration&gt; ||
  1112               &lt;animation-timing-function&gt; ||
  1113               &lt;animation-delay&gt; ||
  1114               &lt;animation-iteration-count&gt; ||
  1115               &lt;animation-direction&gt; ||
  1116               &lt;animation-fill-mode&gt;]
  1117               [, [&lt;animation-name&gt; ||
  1118               &lt;animation-duration&gt; ||
  1119               &lt;animation-timing-function&gt; ||
  1120               &lt;animation-delay&gt; ||
  1121               &lt;animation-iteration-count&gt; ||
  1122               &lt;animation-direction&gt; ||
  1123               &lt;animation-fill-mode&gt;] ]*
  1124             </td>
  1125           </tr>
  1126           <tr>
  1127             <td>
  1128               <em>Initial:</em>
  1129             </td>
  1130             <td>
  1131               see individual properties
  1132             </td>
  1133           </tr>
  1134           <tr>
  1135             <td>
  1136               <em>Applies&nbsp;to:</em>
  1137             </td>
  1138             <td>
  1139               all elements, :before and :after pseudo elements
  1140             </td>
  1141           </tr>
  1142           <tr>
  1143             <td>
  1144               <em>Inherited:</em>
  1145             </td>
  1146             <td>
  1147               no
  1148             </td>
  1149           </tr>
  1150           <tr>
  1151             <td>
  1152               <em>Percentages:</em>
  1153             </td>
  1154             <td>
  1155               N/A
  1156             </td>
  1157           </tr>
  1158           <tr>
  1159             <td>
  1160               <em>Media:</em>
  1161             </td>
  1162             <td>
  1163               visual
  1164             </td>
  1165           </tr>
  1166           <tr>
  1167             <td>
  1168               <em>Computed value:</em>
  1169             </td>
  1170             <td>
  1171               Same as specified value.
  1172             </td>
  1173           </tr>
  1174         </tbody>
  1175       </table><!-- ======================================================================================================= -->
  1176       <h2>
  1177         Animation Events
  1178       </h2>
  1179       <p>
  1180         Several animation related events are available through the <a
  1181         href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Event
  1182         system</a>. The start and end of an animation, and the end of each
  1183         iteration of an animation all generate DOM events. An element can have
  1184         multiple properties being animated simultaneously. This can occur either
  1185         with a single <span class="prop-name">animation-name</span> value with
  1186         keyframes containing multiple properties, or with multiple <span
  1187         class="prop-name">animation-name</span> values. For the purposes of
  1188         events, each <span class="prop-name">animation-name</span> specifies a
  1189         single animation. Therefore an event will be generated for each <span
  1190         class="prop-name">animation-name</span> value and not necessarily for
  1191         each property being animated.
  1192       </p>
  1193       <p>
  1194         The time the animation has been running is sent with each event
  1195         generated. This allows the event handler to determine the current
  1196         iteration of a looping animation or the current position of an
  1197         alternating animation. This time does not include any time the animation
  1198         was in the <code>paused</code> play state.
  1199       </p>
  1200       <dl>
  1201         <dt>
  1202           <b>Interface <i><a id="Events-AnimationEvent" name='Events-AnimationEvent'>AnimationEvent</a></i></b>
  1203         </dt>
  1204         <dd>
  1205           <p>
  1206             The <code>AnimationEvent</code> interface provides specific contextual information associated with Animation events.
  1207           </p>
  1208           <dl>
  1209             <dt>
  1210               <br>
  1211               <b>IDL Definition</b>
  1212             </dt>
  1213             <dd>
  1214               <div class='idl-code'>
  1215                 <pre>
  1216   interface AnimationEvent : Event {
  1217     readonly attribute DOMString          animationName;
  1218     readonly attribute float              elapsedTime;
  1219     void               initAnimationEvent(in DOMString typeArg, 
  1220                                           in boolean canBubbleArg, 
  1221                                           in boolean cancelableArg, 
  1222                                           in DOMString animationNameArg,
  1223                                           in float elapsedTimeArg);
  1224   };
  1225   </pre>
  1226               </div>
  1227             </dd>
  1228             <dt>
  1229               <b>Attributes</b>
  1230             </dt>
  1231             <dd>
  1232               <dl>
  1233                 <dt>
  1234                   <code class='attribute-name'><a id="Events-AnimationEvent-animationName" name='Events-AnimationEvent-animationName'>animationName</a></code> of type <code>DOMString</code>, readonly
  1235                 </dt>
  1236                 <dd>
  1237                   The value of the <span
  1238                   class="prop-name">animation-name</span> property of the
  1239                   animation that fired the event.
  1240                 </dd>
  1241               </dl>
  1242               <dl>
  1243                 <dt>
  1244                   <code class='attribute-name'><a id="Events-AnimationEvent-elapsedTime" name='Events-AnimationEvent-elapsedTime'>elapsedTime</a></code> of type <code>float</code>, readonly
  1245                 </dt>
  1246                 <dd>
  1247                   The amount of time the animation has been running, in
  1248                   seconds, when this event fired, excluding any time the
  1249                   animation was paused. For an "animationstart" event, the
  1250                   elapsedTime is zero unless there was a negative value for
  1251                   <span class="prop-name">animation-delay</span>, in which
  1252                   case the event will be fired with an elapsedTime of (-1 *
  1253                   delay).
  1254                 </dd>
  1255               </dl>
  1256             </dd>
  1257             <dt>
  1258               <b>Methods</b>
  1259             </dt>
  1260             <dd>
  1261               <dl>
  1262                 <dt>
  1263                   <code class='method-name'><a id="Events-AnimationEvent-initAnimationEvent" name='Events-AnimtionEvent-initAnimationEvent'>initAnimationEvent</a></code>
  1264                 </dt>
  1265                 <dd>
  1266                   <div class='method'>
  1267                     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.
  1268                     <div class='parameters'>
  1269                       <b>Parameters</b>
  1270                       <div class='paramtable'>
  1271                         <dl>
  1272                           <dt>
  1273                             <code class='parameter-name'>typeArg</code> of type <code>DOMString</code>
  1274                           </dt>
  1275                           <dd>
  1276                             Specifies the event type.<br>
  1277                           </dd>
  1278                           <dt>
  1279                             <code class='parameter-name'>canBubbleArg</code> of type <code>boolean</code>
  1280                           </dt>
  1281                           <dd>
  1282                             Specifies whether or not the event can bubble.<br>
  1283                           </dd>
  1284                           <dt>
  1285                             <code class='parameter-name'>cancelableArg</code> of type <code>boolean</code>
  1286                           </dt>
  1287                           <dd>
  1288                             Specifies whether or not the event's default action can be prevented.
  1289                           </dd>
  1290                           <dt>
  1291                             <code class='parameter-name'>animationNameArg</code> of type <code>DOMString</code>
  1292                           </dt>
  1293                           <dd>
  1294                             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>
  1295                           </dd>
  1296                           <dt>
  1297                             <code class='parameter-name'>elapsedTimeArg</code> of type <code>float</code>
  1298                           </dt>
  1299                           <dd>
  1300                             Specifies the amount of time, in seconds, the animation has been running at the time of initialization.
  1301                           </dd>
  1302                         </dl>
  1303                       </div>
  1304                     </div><!-- parameters -->
  1305                     <div>
  1306                       <b>No Return Value</b>
  1307                     </div>
  1308                     <div>
  1309                       <b>No Exceptions</b>
  1310                     </div>
  1311                   </div><!-- method -->
  1312                 </dd>
  1313               </dl>
  1314             </dd>
  1315           </dl>
  1316         </dd>
  1317       </dl>
  1318       <p>
  1319         The different types of Animation events that can occur are:
  1320       </p>
  1321       <dl>
  1322         <dt>
  1323           <b>animationstart</b>
  1324         </dt>
  1325         <dd>
  1326           The 'animationstart' event occurs at the start of the animation. If there is an <span
  1327           class="prop-name">animation-delay</span> then this event will fire once the delay period
  1328           has expired. A negative delay will cause the event to fire with an elapsedTime equal to
  1329           the absolute value of the delay.
  1330           <ul>
  1331             <li>Bubbles: Yes
  1332             </li>
  1333             <li>Cancelable: Yes
  1334             </li>
  1335             <li>Context Info: animationName
  1336             </li>
  1337           </ul>
  1338         </dd>
  1339         <dt>
  1340           <b>animationend</b>
  1341         </dt>
  1342         <dd>
  1343           The 'animationend' event occurs when the animation finishes.
  1344           <ul>
  1345             <li>Bubbles: Yes
  1346             </li>
  1347             <li>Cancelable: Yes
  1348             </li>
  1349             <li>Context Info: animationName, elapsedTime
  1350             </li>
  1351           </ul>
  1352         </dd>
  1353         <dt>
  1354           <b>animationiteration</b>
  1355         </dt>
  1356         <dd>
  1357           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.
  1358           <ul>
  1359             <li>Bubbles: Yes
  1360             </li>
  1361             <li>Cancelable: Yes
  1362             </li>
  1363             <li>Context Info: animationName, elapsedTime
  1364             </li>
  1365           </ul>
  1366         </dd>
  1367       </dl>
  1368       <!-- ======================================================================================================= -->
  1369         <h2>
  1370           DOM Interfaces
  1371         </h2>
  1372         <p>
  1373           CSS animation is exposed to the CSSOM through a pair of new interfaces
  1374           describing the keyframes.
  1375         </p>
  1376         <dl>
  1377           <dt>
  1378             <b>Interface <i><a id="DOM-CSSRule" name='DOM-CSSRule'>CSSRule</a></i></b>
  1379           </dt>
  1380           <dd>
  1381             <p>
  1382               The following 2 rule types are added to the <code>CSSRule</code> interface. They provide identification for the new keyframe and keyframes rules.
  1383             </p>
  1384             <dl>
  1386               <dt>
  1387                 <b>IDL Definition</b>
  1388               </dt>
  1389               <dd>
  1390                 <div class='idl-code'>
  1391                   <pre>
  1392     interface CSSRule {
  1393       ...
  1394       const unsigned short KEYFRAMES_RULE = 7;
  1395       const unsigned short KEYFRAME_RULE = 8;
  1396       ...
  1397     };</pre>
  1398                 </div>
  1399               </dd> <!-- IDL -->
  1400             </dl>
  1401           </dd>
  1403           <dt>
  1404             <b>Interface <i><a id="DOM-CSSKeyframeRule" name='DOM-CSSKeyframeRule'>CSSKeyframeRule</a></i></b>
  1405           </dt>
  1406           <dd>
  1407             <p>
  1408               The <code>CSSKeyframeRule</code> interface represents the style rule for a single key.
  1409             </p>
  1410             <dl>
  1411               <dt>
  1412                 <br>
  1413                 <b>IDL Definition</b>
  1414               </dt>
  1415               <dd>
  1416                 <div class='idl-code'>
  1417                   <pre>
  1418     interface CSSKeyframeRule : CSSRule {
  1419         attribute DOMString keyText;
  1420         readonly attribute CSSStyleDeclaration style;
  1421     };
  1422     </pre>
  1423                 </div><br>
  1424               </dd>
  1425               <dt>
  1426                 <b>Attributes</b>
  1427               </dt>
  1428               <dd>
  1429                 <dl>
  1430                   <dt>
  1431                     <code class='attribute-name'><a id="DOM-CSSKeyframeRule-keyText" name='DOM-CSSKeyframeRule-keyText'>keyText</a></code> of type <code>DOMString</code>
  1432                   </dt>
  1433                   <dd>
  1434                     This attribute represents the key as the string representation of a floating point number between 0 and 1. If the value 
  1435                     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 
  1436                     value will be 1.<br>
  1437                   </dd>
  1438                 </dl>
  1439               </dd>
  1440               <dd>
  1441                 <dl>
  1442                   <dt>
  1443                     <code class='attribute-name'><a id="DOM-CSSKeyframeRule-style" name='DOM-CSSKeyframeRule-style'>style</a></code> of type <code>CSSStyleDeclaration</code>
  1444                   </dt>
  1445                   <dd>
  1446                     This attribute represents the style associated with this keyframe.<br>
  1447                   </dd>
  1448                 </dl>
  1449               </dd>
  1450               <dt>
  1451                 <b>No Methods</b>
  1452               </dt>
  1453             </dl>
  1454           </dd>
  1455         </dl>
  1456         <dl>
  1457           <dt>
  1458             <b>Interface <i><a id="DOM-CSSKeyframesRule" name='DOM-CSSKeyframesRule'>CSSKeyframesRule</a></i></b>
  1459           </dt>
  1460           <dd>
  1461             <p>
  1462               The <code>CSSKeyframesRule</code> interface represents a complete set of keyframes for a single animation.
  1463             </p>
  1464             <dl>
  1465               <dt>
  1466                 <br>
  1467                 <b>IDL Definition</b>
  1468               </dt>
  1469               <dd>
  1470                 <div class='idl-code'>
  1471                   <pre>
  1472     interface CSSKeyframesRule : CSSRule {
  1473         attribute          DOMString   name;
  1474         readonly attribute CSSRuleList cssRules;
  1476         void               appendRule(in DOMString rule);
  1477         void               deleteRule(in DOMString key);
  1478         CSSKeyframeRule    findRule(in DOMString key);
  1479     };
  1480     </pre>
  1481                 </div><br>
  1482               </dd>
  1483               <dt>
  1484                 <b>Attributes</b>
  1485               </dt>
  1486               <dd>
  1487                 <dl>
  1488                   <dt>
  1489                     <code class='attribute-name'><a id="DOM-CSSKeyframesRule-name" name='DOM-CSSKeyframesRule-name'>name</a></code> of type <code>DOMString</code>
  1490                   </dt>
  1491                   <dd>
  1492                     This attribute is the name of the keyframes, used by the <code>animation-name</code> property.<br>
  1493                   </dd>
  1494                 </dl>
  1495               </dd>
  1496               <dd>
  1497                 <dl>
  1498                   <dt>
  1499                     <code class='attribute-name'><a id="DOM-CSSKeyframeRules-cssRules" name='DOM-CSSKeyframeRules-cssRules'>cssRules</a></code> of type <code>CSSRuleList</code>
  1500                   </dt>
  1501                   <dd>
  1502                     This attribute gives access to the keyframes in the list.<br>
  1503                   </dd>
  1504                 </dl>
  1505               </dd>
  1506               <dt>
  1507                 <b>Methods</b>
  1508                 <dd>
  1509                   <dl>
  1510                     <!-- ======================================================================================================= -->
  1511                     <dt>
  1512                       <code class='method-name'><a id="DOM-CSSKeyframesRule-appendRule" name='DOM-CSSKeyframesRule-appendRule'>appendRule</a></code>
  1513                     </dt>
  1514                     <dd>
  1515                       <div class='method'>
  1516                         The <code>appendRule</code> method appends the passed CSSKeyframeRule into the list at the passed key.
  1517                         <div class='parameters'>
  1518                           <b>Parameters</b>
  1519                           <div class='paramtable'>
  1520                             <dl>
  1521                                <dt>
  1522                                 <code class='parameter-name'>rule</code> of type <code>DOMString</code>
  1523                               </dt>
  1524                               <dd>
  1525                                 The rule to be appended, expressed in the same syntax as one entry in the
  1526                                 <code>@keyframes</code> rule.
  1527                               </dd>
  1528                             </dl>
  1529                           </div>
  1530                         </div><!-- parameters -->
  1531                         <div class='return-value'>
  1532                           <b>No Return Value</b>
  1533                         </div>
  1534                         <div>
  1535                           <b>No Exceptions</b>
  1536                         </div>
  1537                       </div><!-- ======================================================================================================= -->
  1538                     </dd>
  1539                     <dt>
  1540                       <code class='method-name'><a id="DOM-CSSKeyframesRule-deleteRule" name='DOM-CSSKeyframesRule-deleteRule'>deleteRule</a></code>
  1541                     </dt>
  1542                     <dd>
  1543                       <div class='method'>
  1544                         The <code>deleteRule</code> method deletes the CSSKeyframeRule with the passed key. If a rule with this key
  1545                         does not exist, the method does nothing.
  1546                         <div class='parameters'>
  1547                           <b>Parameters</b>
  1548                           <div class='paramtable'>
  1549                             <dl>
  1550                               <dt>
  1551                                 <code class='parameter-name'>key</code> of type <code>DOMString</code>
  1552                               </dt>
  1553                               <dd>
  1554                                 The key which describes the rule to be deleted. The key must
  1555                                 resolve to a number between 0 and 1, or the rule is ignored.<br>
  1556                               </dd>
  1557                             </dl>
  1558                           </div>
  1559                         </div><!-- parameters -->
  1560                         <div class='return-value'>
  1561                           <b>No Return Value</b>
  1562                         </div>
  1563                         <div>
  1564                           <b>No Exceptions</b>
  1565                         </div>
  1566                       </div><!-- ======================================================================================================= -->
  1567                     </dd>
  1568                     <dt>
  1569                       <code class='method-name'><a id="DOM-CSSKeyframesRule-findRule" name='DOM-CSSKeyframesRule-findRule'>findRule</a></code>
  1570                     </dt>
  1571                     <dd>
  1572                       <div class='method'>
  1573                         The <code>findRule</code> method returns the rule with a key matching the passed key. If no such rule
  1574                         exists, a null value is returned.
  1575                         <div class='parameters'>
  1576                           <b>Parameters</b>
  1577                           <div class='paramtable'>
  1578                             <dl>
  1579                               <dt>
  1580                                 <code class='parameter-name'>key</code> of type <code>DOMString</code>
  1581                               </dt>
  1582                               <dd>
  1583                                 The key which described the rule to find. The key must
  1584                                 resolve to a number between 0 and 1, or the rule is ignored.<br>
  1585                               </dd>
  1586                             </dl>
  1587                           </div>
  1588                         </div><!-- parameters -->
  1589                         <div class='return-value'>
  1590                           <b>Return Value</b>
  1591                           <div class='returnvalue'>
  1592                             <dl>
  1593                               <dt>
  1594                                 <code>CSSKeyframeRule</code>
  1595                               </dt>
  1596                               <dd>
  1597                                 The found rule.<br>
  1598                               </dd>
  1599                             </dl>
  1600                           </div>
  1601                         </div>
  1602                         <div>
  1603                           <b>No Exceptions</b>
  1604                         </div>
  1605                       </div><!-- ======================================================================================================= -->
  1606                     </dd>
  1607                   </dl><!-- method -->
  1608                 </dd>
  1609               </dt>
  1610             </dl>
  1611           </dd>
  1612         </dl>
  1614 <h2>References</h2>
  1616 <h3 class="no-num">Normative references</h3>
  1617 <!--normative-->
  1619 <h3 class="no-num">Other references</h3>
  1620 <!--informative-->
  1624 <h2 class="no-num">Property index</h2>
  1625 <!-- properties -->
  1629 <h2 class="no-num" id="index">Index</h2>
  1630 <!--index-->
  1632 </body>
  1633 </html>
  1634 <!-- Keep this comment at the end of the file
  1635 Local variables:
  1636 mode: sgml
  1637 sgml-default-doctype-name:"html"
  1638 sgml-minimize-attributes:t
  1639 End:
  1640 -->

mercurial