css3-animations/Overview.src.html

Tue, 27 Mar 2012 09:44:01 -0700

author
L. David Baron <dbaron@dbaron.org>
date
Tue, 27 Mar 2012 09:44:01 -0700
changeset 5229
182c2cd55153
parent 4551
9291fb211b30
child 5294
7cddcc2eae6e
permissions
-rw-r--r--

Add 'Discussion:' line to spec header.

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

mercurial