css3-animations/Overview.src.html

Thu, 29 Mar 2012 13:03:51 -0700

author
L. David Baron <dbaron@dbaron.org>
date
Thu, 29 Mar 2012 13:03:51 -0700
changeset 5317
db80fef343f8
parent 5312
f2453d922d28
child 5318
1a7463c1d7f7
permissions
-rw-r--r--

Fix source-only validation error and corresponding incorrect indentation.

     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 some or all cycles.  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 | reverse | alternate | alternate-reverse ] [, [ normal | reverse | alternate | alternate-reverse ] ]*
   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       <dl>
   805         <dt>normal</dt>
   806           <dd>All iterations of the animation are played as specified.</dd>
   807         <dt>reverse</dt>
   808           <dd>All iterations of the animation are played in the reverse direction from the way they were specified.</dd>
   809         <dt>alternate</dt>
   810           <dd>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.</dd>
   811         <dt>alternate-reverse</dt>
   812           <dd>The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction.</dd>
   813       </dl>
   814       <!-- ======================================================================================================= -->
   815       <h3>
   816         The <code class="property">'animation-play-state'</code> Property
   817       </h3>
   819       <p>
   820         The <code class="property">'animation-play-state'</code> property defines whether the animation is running or paused. A running animation can be paused by setting this property to <code class="css">'paused'</code>. To continue running a paused animation this property can be set to <code class="css">'running'</code>. A paused animation will continue to display the current value of the animation in a static state, as if the time of the animation is constant. When a paused animation is resumed, it restarts from the current value, not necessarily from the beginning of the animation.
   821       </p>
   822       <table class="propdef">
   823         <tbody>
   824           <tr>
   825             <td>
   826               <em>Name:</em>
   827             </td>
   828             <td>
   829               <dfn id="animation-play-state">animation-play-state</dfn>
   830             </td>
   831           </tr>
   832           <tr>
   833             <td>
   834               <em>Value:</em>
   835             </td>
   836             <td>
   837               [ running | paused ] [, [ running | paused ] ]*
   838             </td>
   839           </tr>
   840           <tr>
   841             <td>
   842               <em>Initial:</em>
   843             </td>
   844             <td>
   845               running
   846             </td>
   847           </tr>
   848           <tr>
   849             <td>
   850               <em>Applies&nbsp;to:</em>
   851             </td>
   852             <td>
   853               all elements, :before and :after pseudo elements
   854             </td>
   855           </tr>
   856           <tr>
   857             <td>
   858               <em>Inherited:</em>
   859             </td>
   860             <td>
   861               no
   862             </td>
   863           </tr>
   864           <tr>
   865             <td>
   866               <em>Percentages:</em>
   867             </td>
   868             <td>
   869               N/A
   870             </td>
   871           </tr>
   872           <tr>
   873             <td>
   874               <em>Media:</em>
   875             </td>
   876             <td>
   877               visual
   878             </td>
   879           </tr>
   880           <tr>
   881             <td>
   882               <em>Computed value:</em>
   883             </td>
   884             <td>
   885               Same as specified value.
   886             </td>
   887           </tr>
   888         </tbody>
   889       </table><!-- ======================================================================================================= -->
   890       <h3>
   891         The <code class="property">'animation-delay'</code> Property
   892       </h3>
   893       <p>
   894         The <code class="property">'animation-delay'</code> property defines
   895         when the animation will start. It allows an animation to begin
   896         execution some time after it is applied. An <code
   897         class="property">'animation-delay'</code> value of '0s' means the
   898         animation will execute as soon as it is applied. Otherwise, the value
   899         specifies an offset from the moment the animation is applied, and the
   900         animation will delay execution by that offset.
   901       </p>
   902       <p>
   903         If the value for <code class="property">'animation-delay'</code> is a
   904         negative time offset then the animation will execute the moment it is
   905         applied, but will appear to have begun execution at the specified
   906         offset. That is, the animation will appear to begin part-way through
   907         its play cycle. In the case where an animation has implied starting
   908         values and a negative <code class="property">'animation-delay'</code>,
   909         the starting values are taken from the moment the animation is applied.
   910       </p>
   911       <table class="propdef">
   912         <tbody>
   913           <tr>
   914             <td>
   915               <em>Name:</em>
   916             </td>
   917             <td>
   918               <dfn id="animation-delay">animation-delay</dfn>
   919             </td>
   920           </tr>
   921           <tr>
   922             <td>
   923               <em>Value:</em>
   924             </td>
   925             <td>
   926               &lt;time&gt; [, &lt;time&gt;]*
   927             </td>
   928           </tr>
   929           <tr>
   930             <td>
   931               <em>Initial:</em>
   932             </td>
   933             <td>
   934               0s
   935             </td>
   936           </tr>
   937           <tr>
   938             <td>
   939               <em>Applies&nbsp;to:</em>
   940             </td>
   941             <td>
   942               all elements, :before and :after pseudo elements
   943             </td>
   944           </tr>
   945           <tr>
   946             <td>
   947               <em>Inherited:</em>
   948             </td>
   949             <td>
   950               no
   951             </td>
   952           </tr>
   953           <tr>
   954             <td>
   955               <em>Percentages:</em>
   956             </td>
   957             <td>
   958               N/A
   959             </td>
   960           </tr>
   961           <tr>
   962             <td>
   963               <em>Media:</em>
   964             </td>
   965             <td>
   966               visual
   967             </td>
   968           </tr>
   969           <tr>
   970             <td>
   971               <em>Computed value:</em>
   972             </td>
   973             <td>
   974               Same as specified value.
   975             </td>
   976           </tr>
   977         </tbody>
   978       </table><!-- ======================================================================================================= -->
   979       <h3>
   980         The <code class="property">'animation-fill-mode'</code> Property
   981       </h3>
   982       <p>
   983         The <code class="property">'animation-fill-mode'</code> property defines
   984         what values are applied by the animation outside the time it is executing.
   985         By default, an animation will not affect property values between the
   986         time it is applied (the <code class="property">'animation-name'</code> property is
   987         set on an element) and the time it begins execution (which is determined by
   988         the <code class="property">'animation-delay'</code> property). Also, by
   989         default an animation does not affect property values after the animation
   990         ends (determined by the <code class="property">'animation-duration'</code> property).
   991         The value of <code class="property">'animation-fill-mode'</code> can
   992         override this behavior.
   993       </p>
   994       <p>
   995         If the value for <code class="property">'animation-fill-mode'</code> is
   996         <code class="css">'backwards'</code>, then the animation will
   997         apply the property values defined in its 0% or 'from' keyframe as soon
   998         as the animation is applied, during the period defined by
   999         <code class="property">'animation-delay'</code>.
  1000       </p>
  1001       <p>
  1002         If the value for <code class="property">'animation-fill-mode'</code>
  1003         is <code class="css">'forwards'</code>, then the animation will
  1004         apply the property values defined in its last executing keyframe after
  1005         the final iteration of the animation, until the animation style is
  1006         removed. The last executing keyframe is the 'to' or '100%' keyframe,
  1007         unless the animation has <code
  1008         class="property">'animation-direction'</code> set to <code
  1009         class="css">'alternate'</code> and both a finite and even
  1010         iteration count, in which case it is the 'from' or '0%' keyframe.
  1011       </p>
  1012       <p>
  1013         If the value for <code class="property">'animation-fill-mode'</code>
  1014         is <code class="css">'both'</code>, then the animation will
  1015         follow the rules for both 'forwards' and 'backwards'. That is, it will
  1016         extend the animation properties in both directions.
  1017       </p>
  1018       <table class="propdef">
  1019         <tbody>
  1020           <tr>
  1021             <td>
  1022               <em>Name:</em>
  1023             </td>
  1024             <td>
  1025               <dfn id="animation-fill-mode">animation-fill-mode</dfn>
  1026             </td>
  1027           </tr>
  1028           <tr>
  1029             <td>
  1030               <em>Value:</em>
  1031             </td>
  1032             <td>
  1033               [ none | forwards | backwards | both ] [, [ none | forwards | backwards | both ] ]*
  1034             </td>
  1035           </tr>
  1036           <tr>
  1037             <td>
  1038               <em>Initial:</em>
  1039             </td>
  1040             <td>
  1041               none
  1042             </td>
  1043           </tr>
  1044           <tr>
  1045             <td>
  1046               <em>Applies&nbsp;to:</em>
  1047             </td>
  1048             <td>
  1049               all elements, :before and :after pseudo elements
  1050             </td>
  1051           </tr>
  1052           <tr>
  1053             <td>
  1054               <em>Inherited:</em>
  1055             </td>
  1056             <td>
  1057               no
  1058             </td>
  1059           </tr>
  1060           <tr>
  1061             <td>
  1062               <em>Percentages:</em>
  1063             </td>
  1064             <td>
  1065               N/A
  1066             </td>
  1067           </tr>
  1068           <tr>
  1069             <td>
  1070               <em>Media:</em>
  1071             </td>
  1072             <td>
  1073               visual
  1074             </td>
  1075           </tr>
  1076           <tr>
  1077             <td>
  1078               <em>Computed value:</em>
  1079             </td>
  1080             <td>
  1081               Same as specified value.
  1082             </td>
  1083           </tr>
  1084         </tbody>
  1085       </table><!-- ======================================================================================================= -->
  1086       <h3>
  1087         The <code class="property">'animation'</code> Shorthand Property
  1088       </h3>
  1089       <p>
  1090         The <code class="property">'animation'</code> shorthand property
  1091         combines seven of the animation properties into a single property.
  1092       </p>
  1093       <p>
  1094         Note that order is important in this property. The first value that can be
  1095         parsed as a time is assigned to the animation-duration. The second value that
  1096         can be parsed as a time is assigned to animation-delay.
  1097       </p>
  1098       <p class="issue">
  1099         An alternative proposal is to accept the font shorthand approach of
  1100         using a "/" character between the values of the same type. e.g. 2s/4s would
  1101         mean a duration of 2 seconds and a delay of 4 seconds.
  1102       </p>
  1103       <table class="propdef">
  1104         <tbody>
  1105           <tr>
  1106             <td>
  1107               <em>Name:</em>
  1108             </td>
  1109             <td>
  1110               <dfn id="animation">animation</dfn>
  1111             </td>
  1112           </tr>
  1113           <tr>
  1114             <td>
  1115               <em>Value:</em>
  1116             </td>
  1117             <td>
  1118               [&lt;animation-name&gt; || 
  1119               &lt;animation-duration&gt; ||
  1120               &lt;animation-timing-function&gt; ||
  1121               &lt;animation-delay&gt; ||
  1122               &lt;animation-iteration-count&gt; ||
  1123               &lt;animation-direction&gt; ||
  1124               &lt;animation-fill-mode&gt;]
  1125               [, [&lt;animation-name&gt; ||
  1126               &lt;animation-duration&gt; ||
  1127               &lt;animation-timing-function&gt; ||
  1128               &lt;animation-delay&gt; ||
  1129               &lt;animation-iteration-count&gt; ||
  1130               &lt;animation-direction&gt; ||
  1131               &lt;animation-fill-mode&gt;] ]*
  1132             </td>
  1133           </tr>
  1134           <tr>
  1135             <td>
  1136               <em>Initial:</em>
  1137             </td>
  1138             <td>
  1139               see individual properties
  1140             </td>
  1141           </tr>
  1142           <tr>
  1143             <td>
  1144               <em>Applies&nbsp;to:</em>
  1145             </td>
  1146             <td>
  1147               all elements, :before and :after pseudo elements
  1148             </td>
  1149           </tr>
  1150           <tr>
  1151             <td>
  1152               <em>Inherited:</em>
  1153             </td>
  1154             <td>
  1155               no
  1156             </td>
  1157           </tr>
  1158           <tr>
  1159             <td>
  1160               <em>Percentages:</em>
  1161             </td>
  1162             <td>
  1163               N/A
  1164             </td>
  1165           </tr>
  1166           <tr>
  1167             <td>
  1168               <em>Media:</em>
  1169             </td>
  1170             <td>
  1171               visual
  1172             </td>
  1173           </tr>
  1174           <tr>
  1175             <td>
  1176               <em>Computed value:</em>
  1177             </td>
  1178             <td>
  1179               Same as specified value.
  1180             </td>
  1181           </tr>
  1182         </tbody>
  1183       </table><!-- ======================================================================================================= -->
  1184       <h2>
  1185         Animation Events
  1186       </h2>
  1187       <p>
  1188         Several animation related events are available through the <a
  1189         href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Event
  1190         system</a>. The start and end of an animation, and the end of each
  1191         iteration of an animation all generate DOM events. An element can have
  1192         multiple properties being animated simultaneously. This can occur either
  1193         with a single <code class="property">animation-name</code> value with
  1194         keyframes containing multiple properties, or with multiple <code
  1195         class="property">animation-name</code> values. For the purposes of
  1196         events, each <code class="property">animation-name</code> specifies a
  1197         single animation. Therefore an event will be generated for each <code
  1198         class="property">animation-name</code> value and not necessarily for
  1199         each property being animated.
  1200       </p>
  1201       <p>
  1202         The time the animation has been running is sent with each event
  1203         generated. This allows the event handler to determine the current
  1204         iteration of a looping animation or the current position of an
  1205         alternating animation. This time does not include any time the animation
  1206         was in the <code>paused</code> play state.
  1207       </p>
  1208       <dl>
  1209         <dt>
  1210           <b>Interface <i><a id="Events-AnimationEvent" name='Events-AnimationEvent'>AnimationEvent</a></i></b>
  1211         </dt>
  1212         <dd>
  1213           <p>
  1214             The <code>AnimationEvent</code> interface provides specific contextual information associated with Animation events.
  1215           </p>
  1216           <dl>
  1217             <dt>
  1218               <br>
  1219               <b>IDL Definition</b>
  1220             </dt>
  1221             <dd>
  1222               <div class='idl-code'>
  1223                 <pre>
  1224   interface AnimationEvent : Event {
  1225     readonly attribute DOMString          animationName;
  1226     readonly attribute float              elapsedTime;
  1227     void               initAnimationEvent(in DOMString typeArg, 
  1228                                           in boolean canBubbleArg, 
  1229                                           in boolean cancelableArg, 
  1230                                           in DOMString animationNameArg,
  1231                                           in float elapsedTimeArg);
  1232   };
  1233   </pre>
  1234               </div>
  1235             </dd>
  1236             <dt>
  1237               <b>Attributes</b>
  1238             </dt>
  1239             <dd>
  1240               <dl>
  1241                 <dt>
  1242                   <code class='attribute-name'><a id="Events-AnimationEvent-animationName" name='Events-AnimationEvent-animationName'>animationName</a></code> of type <code>DOMString</code>, readonly
  1243                 </dt>
  1244                 <dd>
  1245                   The value of the <code class="property">animation-name</code> property of the
  1246                   animation that fired the event.
  1247                 </dd>
  1248               </dl>
  1249               <dl>
  1250                 <dt>
  1251                   <code class='attribute-name'><a id="Events-AnimationEvent-elapsedTime" name='Events-AnimationEvent-elapsedTime'>elapsedTime</a></code> of type <code>float</code>, readonly
  1252                 </dt>
  1253                 <dd>
  1254                   The amount of time the animation has been running, in
  1255                   seconds, when this event fired, excluding any time the
  1256                   animation was paused. For an "animationstart" event, the
  1257                   elapsedTime is zero unless there was a negative value for
  1258                   <code class="property">animation-delay</code>, in which
  1259                   case the event will be fired with an elapsedTime of (-1 *
  1260                   delay).
  1261                 </dd>
  1262               </dl>
  1263             </dd>
  1264             <dt>
  1265               <b>Methods</b>
  1266             </dt>
  1267             <dd>
  1268               <dl>
  1269                 <dt>
  1270                   <code class='method-name'><a id="Events-AnimationEvent-initAnimationEvent" name='Events-AnimtionEvent-initAnimationEvent'>initAnimationEvent</a></code>
  1271                 </dt>
  1272                 <dd>
  1273                   <div class='method'>
  1274                     The <code>initAnimationEvent</code> method is used to initialize the value of an <code>AnimationEvent</code> created through the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-DocumentEvent'><code>DocumentEvent</code></a> interface. This method may only be called before the <code>AnimationEvent</code> has been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
  1275                     <div class='parameters'>
  1276                       <b>Parameters</b>
  1277                       <div class='paramtable'>
  1278                         <dl>
  1279                           <dt>
  1280                             <code class='parameter-name'>typeArg</code> of type <code>DOMString</code>
  1281                           </dt>
  1282                           <dd>
  1283                             Specifies the event type.<br>
  1284                           </dd>
  1285                           <dt>
  1286                             <code class='parameter-name'>canBubbleArg</code> of type <code>boolean</code>
  1287                           </dt>
  1288                           <dd>
  1289                             Specifies whether or not the event can bubble.<br>
  1290                           </dd>
  1291                           <dt>
  1292                             <code class='parameter-name'>cancelableArg</code> of type <code>boolean</code>
  1293                           </dt>
  1294                           <dd>
  1295                             Specifies whether or not the event's default action can be prevented.
  1296                           </dd>
  1297                           <dt>
  1298                             <code class='parameter-name'>animationNameArg</code> of type <code>DOMString</code>
  1299                           </dt>
  1300                           <dd>
  1301                             Specifies the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>'s animation name.<br>
  1302                           </dd>
  1303                           <dt>
  1304                             <code class='parameter-name'>elapsedTimeArg</code> of type <code>float</code>
  1305                           </dt>
  1306                           <dd>
  1307                             Specifies the amount of time, in seconds, the animation has been running at the time of initialization.
  1308                           </dd>
  1309                         </dl>
  1310                       </div>
  1311                     </div><!-- parameters -->
  1312                     <div>
  1313                       <b>No Return Value</b>
  1314                     </div>
  1315                     <div>
  1316                       <b>No Exceptions</b>
  1317                     </div>
  1318                   </div><!-- method -->
  1319                 </dd>
  1320               </dl>
  1321             </dd>
  1322           </dl>
  1323         </dd>
  1324       </dl>
  1325       <p>
  1326         The different types of Animation events that can occur are:
  1327       </p>
  1328       <dl>
  1329         <dt>
  1330           <b>animationstart</b>
  1331         </dt>
  1332         <dd>
  1333           The 'animationstart' event occurs at the start of the animation. If there is an
  1334           <code class="property">animation-delay</code> then this event will fire once the delay period
  1335           has expired. A negative delay will cause the event to fire with an elapsedTime equal to
  1336           the absolute value of the delay.
  1337           <ul>
  1338             <li>Bubbles: Yes
  1339             </li>
  1340             <li>Cancelable: No
  1341             </li>
  1342             <li>Context Info: animationName
  1343             </li>
  1344           </ul>
  1345         </dd>
  1346         <dt>
  1347           <b>animationend</b>
  1348         </dt>
  1349         <dd>
  1350           The 'animationend' event occurs when the animation finishes.
  1351           <ul>
  1352             <li>Bubbles: Yes
  1353             </li>
  1354             <li>Cancelable: No
  1355             </li>
  1356             <li>Context Info: animationName, elapsedTime
  1357             </li>
  1358           </ul>
  1359         </dd>
  1360         <dt>
  1361           <b>animationiteration</b>
  1362         </dt>
  1363         <dd>
  1364           The 'animationiteration' event occurs at the end of each iteration of an animation for which <code>animation-iteration-count</code> is greater than one. This event does not occur for animations with an iteration count of one.
  1365           <ul>
  1366             <li>Bubbles: Yes
  1367             </li>
  1368             <li>Cancelable: No
  1369             </li>
  1370             <li>Context Info: animationName, elapsedTime
  1371             </li>
  1372           </ul>
  1373         </dd>
  1374       </dl>
  1375       <!-- ======================================================================================================= -->
  1376         <h2>
  1377           DOM Interfaces
  1378         </h2>
  1379         <p>
  1380           CSS animation is exposed to the CSSOM through a pair of new interfaces
  1381           describing the keyframes.
  1382         </p>
  1383         <dl>
  1384           <dt>
  1385             <b>Interface <i><a id="DOM-CSSRule" name='DOM-CSSRule'>CSSRule</a></i></b>
  1386           </dt>
  1387           <dd>
  1388             <p>
  1389               The following 2 rule types are added to the <code>CSSRule</code> interface. They provide identification for the new keyframe and keyframes rules.
  1390             </p>
  1391             <dl>
  1393               <dt>
  1394                 <b>IDL Definition</b>
  1395               </dt>
  1396               <dd>
  1397                 <div class='idl-code'>
  1398                   <pre>
  1399     interface CSSRule {
  1400       ...
  1401       const unsigned short KEYFRAMES_RULE = 7;
  1402       const unsigned short KEYFRAME_RULE = 8;
  1403       ...
  1404     };</pre>
  1405                 </div>
  1406               </dd> <!-- IDL -->
  1407             </dl>
  1408           </dd>
  1410           <dt>
  1411             <b>Interface <i><a id="DOM-CSSKeyframeRule" name='DOM-CSSKeyframeRule'>CSSKeyframeRule</a></i></b>
  1412           </dt>
  1413           <dd>
  1414             <p>
  1415               The <code>CSSKeyframeRule</code> interface represents the style rule for a single key.
  1416             </p>
  1417             <dl>
  1418               <dt>
  1419                 <br>
  1420                 <b>IDL Definition</b>
  1421               </dt>
  1422               <dd>
  1423                 <div class='idl-code'>
  1424                   <pre>
  1425     interface CSSKeyframeRule : CSSRule {
  1426         attribute DOMString keyText;
  1427         readonly attribute CSSStyleDeclaration style;
  1428     };
  1429     </pre>
  1430                 </div><br>
  1431               </dd>
  1432               <dt>
  1433                 <b>Attributes</b>
  1434               </dt>
  1435               <dd>
  1436                 <dl>
  1437                   <dt>
  1438                     <code class='attribute-name'><a id="DOM-CSSKeyframeRule-keyText" name='DOM-CSSKeyframeRule-keyText'>keyText</a></code> of type <code>DOMString</code>
  1439                   </dt>
  1440                   <dd>
  1441                     This attribute represents the key as the string representation of a floating point number between 0 and 1. If the value 
  1442                     in the CSS style is <code>from</code> this value will be 0, and if the value in the CSS style is <code>to</code> this 
  1443                     value will be 1.<br>
  1444                   </dd>
  1445                 </dl>
  1446               </dd>
  1447               <dd>
  1448                 <dl>
  1449                   <dt>
  1450                     <code class='attribute-name'><a id="DOM-CSSKeyframeRule-style" name='DOM-CSSKeyframeRule-style'>style</a></code> of type <code>CSSStyleDeclaration</code>
  1451                   </dt>
  1452                   <dd>
  1453                     This attribute represents the style associated with this keyframe.<br>
  1454                   </dd>
  1455                 </dl>
  1456               </dd>
  1457               <dt>
  1458                 <b>No Methods</b>
  1459               </dt>
  1460             </dl>
  1461           </dd>
  1462         </dl>
  1463         <dl>
  1464           <dt>
  1465             <b>Interface <i><a id="DOM-CSSKeyframesRule" name='DOM-CSSKeyframesRule'>CSSKeyframesRule</a></i></b>
  1466           </dt>
  1467           <dd>
  1468             <p>
  1469               The <code>CSSKeyframesRule</code> interface represents a complete set of keyframes for a single animation.
  1470             </p>
  1471             <dl>
  1472               <dt>
  1473                 <br>
  1474                 <b>IDL Definition</b>
  1475               </dt>
  1476               <dd>
  1477                 <div class='idl-code'>
  1478                   <pre>
  1479     interface CSSKeyframesRule : CSSRule {
  1480         attribute          DOMString   name;
  1481         readonly attribute CSSRuleList cssRules;
  1483         void               appendRule(in DOMString rule);
  1484         void               deleteRule(in DOMString key);
  1485         CSSKeyframeRule    findRule(in DOMString key);
  1486     };
  1487     </pre>
  1488                 </div><br>
  1489               </dd>
  1490               <dt>
  1491                 <b>Attributes</b>
  1492               </dt>
  1493               <dd>
  1494                 <dl>
  1495                   <dt>
  1496                     <code class='attribute-name'><a id="DOM-CSSKeyframesRule-name" name='DOM-CSSKeyframesRule-name'>name</a></code> of type <code>DOMString</code>
  1497                   </dt>
  1498                   <dd>
  1499                     This attribute is the name of the keyframes, used by the <code>animation-name</code> property.<br>
  1500                   </dd>
  1501                 </dl>
  1502               </dd>
  1503               <dd>
  1504                 <dl>
  1505                   <dt>
  1506                     <code class='attribute-name'><a id="DOM-CSSKeyframeRules-cssRules" name='DOM-CSSKeyframeRules-cssRules'>cssRules</a></code> of type <code>CSSRuleList</code>
  1507                   </dt>
  1508                   <dd>
  1509                     This attribute gives access to the keyframes in the list.<br>
  1510                   </dd>
  1511                 </dl>
  1512               </dd>
  1513               <dt>
  1514                 <b>Methods</b>
  1515               </dt>
  1516               <dd>
  1517                 <dl>
  1518                   <!-- ======================================================================================================= -->
  1519                   <dt>
  1520                     <code class='method-name'><a id="DOM-CSSKeyframesRule-appendRule" name='DOM-CSSKeyframesRule-appendRule'>appendRule</a></code>
  1521                   </dt>
  1522                   <dd>
  1523                     <div class='method'>
  1524                       The <code>appendRule</code> method appends the passed CSSKeyframeRule into the list at the passed key.
  1525                       <div class='parameters'>
  1526                         <b>Parameters</b>
  1527                         <div class='paramtable'>
  1528                           <dl>
  1529                              <dt>
  1530                               <code class='parameter-name'>rule</code> of type <code>DOMString</code>
  1531                             </dt>
  1532                             <dd>
  1533                               The rule to be appended, expressed in the same syntax as one entry in the
  1534                               <code>@keyframes</code> rule.
  1535                             </dd>
  1536                           </dl>
  1537                         </div>
  1538                       </div><!-- parameters -->
  1539                       <div class='return-value'>
  1540                         <b>No Return Value</b>
  1541                       </div>
  1542                       <div>
  1543                         <b>No Exceptions</b>
  1544                       </div>
  1545                     </div><!-- ======================================================================================================= -->
  1546                   </dd>
  1547                   <dt>
  1548                     <code class='method-name'><a id="DOM-CSSKeyframesRule-deleteRule" name='DOM-CSSKeyframesRule-deleteRule'>deleteRule</a></code>
  1549                   </dt>
  1550                   <dd>
  1551                     <div class='method'>
  1552                       The <code>deleteRule</code> method deletes the CSSKeyframeRule with the passed key. If a rule with this key
  1553                       does not exist, the method does nothing.
  1554                       <div class='parameters'>
  1555                         <b>Parameters</b>
  1556                         <div class='paramtable'>
  1557                           <dl>
  1558                             <dt>
  1559                               <code class='parameter-name'>key</code> of type <code>DOMString</code>
  1560                             </dt>
  1561                             <dd>
  1562                               The key which describes the rule to be deleted. The key must
  1563                               resolve to a number between 0 and 1, or the rule is ignored.<br>
  1564                             </dd>
  1565                           </dl>
  1566                         </div>
  1567                       </div><!-- parameters -->
  1568                       <div class='return-value'>
  1569                         <b>No Return Value</b>
  1570                       </div>
  1571                       <div>
  1572                         <b>No Exceptions</b>
  1573                       </div>
  1574                     </div><!-- ======================================================================================================= -->
  1575                   </dd>
  1576                   <dt>
  1577                     <code class='method-name'><a id="DOM-CSSKeyframesRule-findRule" name='DOM-CSSKeyframesRule-findRule'>findRule</a></code>
  1578                   </dt>
  1579                   <dd>
  1580                     <div class='method'>
  1581                       The <code>findRule</code> method returns the rule with a key matching the passed key. If no such rule
  1582                       exists, a null value is returned.
  1583                       <div class='parameters'>
  1584                         <b>Parameters</b>
  1585                         <div class='paramtable'>
  1586                           <dl>
  1587                             <dt>
  1588                               <code class='parameter-name'>key</code> of type <code>DOMString</code>
  1589                             </dt>
  1590                             <dd>
  1591                               The key which described the rule to find. The key must
  1592                               resolve to a number between 0 and 1, or the rule is ignored.<br>
  1593                             </dd>
  1594                           </dl>
  1595                         </div>
  1596                       </div><!-- parameters -->
  1597                       <div class='return-value'>
  1598                         <b>Return Value</b>
  1599                         <div class='returnvalue'>
  1600                           <dl>
  1601                             <dt>
  1602                               <code>CSSKeyframeRule</code>
  1603                             </dt>
  1604                             <dd>
  1605                               The found rule.<br>
  1606                             </dd>
  1607                           </dl>
  1608                         </div>
  1609                       </div>
  1610                       <div>
  1611                         <b>No Exceptions</b>
  1612                       </div>
  1613                     </div><!-- ======================================================================================================= -->
  1614                   </dd>
  1615                 </dl><!-- method -->
  1616               </dd>
  1617             </dl>
  1618           </dd>
  1619         </dl>
  1621 <h2 id="acknowledgments">Acknowledgments</h2>
  1623 <p>Thanks especially to the feedback from
  1624 Tab Atkins,
  1625 Estelle Weyl,
  1626 and all the rest of the
  1627 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.</p>
  1629 <h2>References</h2>
  1631 <h3 class="no-num">Normative references</h3>
  1632 <!--normative-->
  1634 <h3 class="no-num">Other references</h3>
  1635 <!--informative-->
  1639 <h2 class="no-num">Property index</h2>
  1640 <!-- properties -->
  1644 <h2 class="no-num" id="index">Index</h2>
  1645 <!--index-->
  1647 </body>
  1648 </html>
  1649 <!-- Keep this comment at the end of the file
  1650 Local variables:
  1651 mode: sgml
  1652 sgml-default-doctype-name:"html"
  1653 sgml-minimize-attributes:t
  1654 End:
  1655 -->

mercurial