Revision 467655 of animation-name

  • Revision slug: Web/CSS/animation-name
  • Revision title: animation-name
  • Revision id: 467655
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}}
{{SeeCompatTable}}

Summary

The animation-name CSS property specifies a list of animations that should be applied to the selected element. Each name indicates a {{cssxref("@keyframes")}} at-rule that defines the property values for the animation sequence.

It is often convenient to use the shorthand property {{cssxref("animation")}} to set all animation properties at once.

{{cssbox("animation-name")}}

Syntax

Formal syntax: {{csssyntax("animation-name")}}
animation-name: none
animation-name: test_05
animation-name: -specific
animation-name: sliding-vertically

animation-name: test1
animation-name: test1, animation4
animation-name: none, -moz-specific, sliding

Values

none
Is a special keyword denoting no keyframes. It can be used to deactivate an animation without changing the ordering of the other identifiers, or to deactivate animations coming from the cascade.
IDENT
A string identifying the animation. This identifier is composed by a combination of case-insensitive letters a to z, numbers 0 to 9, underscores (_), and/or dashes (-). The first non-dash character must be a letter (that is, no number at the beginning of it, even if preceded by a dash.) Also, two dashes are forbidden at the beginning of the identifier.

Examples

See CSS animations for examples.

Specifications

Specification Status Comment
{{SpecName('CSS3 Animations', '#animation-name', 'animation-name')}} {{Spec2('CSS3 Animations')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}}{{property_prefix("-webkit")}} {{CompatGeckoDesktop("5.0")}}{{property_prefix("-moz")}}
{{CompatGeckoDesktop("16.0")}}
10  12 {{property_prefix("-o")}}
12.10 #
4.0{{property_prefix("-webkit")}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}}{{property_prefix("-webkit")}} {{CompatGeckoMobile("5.0")}}{{property_prefix("-moz")}}
{{CompatGeckoMobile("16.0")}}
10 {{CompatUnknown}} {{CompatUnknown}}

See also

Revision Source

<div>
  {{CSSRef}}</div>
<div>
  {{SeeCompatTable}}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>animation-name</code> <a href="/en-US/docs/CSS" title="CSS">CSS</a> property specifies a list of animations that should be applied to the selected element. Each name indicates a {{cssxref("@keyframes")}} at-rule that defines the property values for the animation sequence.</p>
<p>It is often convenient to use the shorthand property {{cssxref("animation")}} to set all animation properties at once.</p>
<p>{{cssbox("animation-name")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("animation-name")}}</pre>
<pre>
animation-name: none
animation-name: test_05
animation-name: -specific
animation-name: sliding-vertically

animation-name: test1
animation-name: test1, animation4
animation-name: none, -moz-specific, sliding
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>none</code></dt>
  <dd>
    Is a special keyword denoting no keyframes. It can be used to deactivate an animation without changing the ordering of the other identifiers, or to deactivate animations coming from the cascade.</dd>
  <dt>
    <code>IDENT</code></dt>
  <dd>
    A string identifying the animation. This identifier is composed by a combination of case-insensitive letters&nbsp;<code>a</code> to <code>z</code>, numbers <code>0</code> to <code>9</code>, underscores (<code>_</code>), and/or dashes (<code>-</code>). The first non-dash character must be a letter (that is, no number at the beginning of it, even if preceded by a dash.) Also, two dashes are forbidden at the beginning of the identifier.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>See <a href="/en-US/docs/CSS/CSS_animations" title="CSS/CSS_animations">CSS animations</a> for examples.</p>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('CSS3 Animations', '#animation-name', 'animation-name')}}</td>
      <td>{{Spec2('CSS3 Animations')}}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}</td>
        <td>{{CompatGeckoDesktop("5.0")}}{{property_prefix("-moz")}}<br />
          {{CompatGeckoDesktop("16.0")}}</td>
        <td>10&nbsp;</td>
        <td>12 {{property_prefix("-o")}}<br />
          12.10 <a href="http://my.opera.com/ODIN/blog/2012/08/03/a-hot-opera-12-50-summer-time-snapshot" title="http://my.opera.com/ODIN/blog/2012/08/03/a-hot-opera-12-50-summer-time-snapshot">#</a></td>
        <td>4.0{{property_prefix("-webkit")}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}</td>
        <td>{{CompatGeckoMobile("5.0")}}{{property_prefix("-moz")}}<br />
          {{CompatGeckoMobile("16.0")}}</td>
        <td>10</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/CSS/Tutorials/Using_CSS_animations" title="Tutorial about CSS animations">Using CSS animations</a></li>
  <li>{{domxref("AnimationEvent", "AnimationEvent")}}</li>
  <li>{{CSS_Reference:animation}}</li>
</ul>
Revert to this revision