transition-property

  • Revision slug: Web/CSS/transition-property
  • Revision title: transition-property
  • Revision id: 423475
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}} {{SeeCompatTable}}

Summary

The transition-property CSS property is used to specify the names of CSS properties to which a transition effect should be applied.

Note: The set of properties that can be animated is subject to change; as such, you should avoid including any properties in the list that don't currently animate, because someday they might, causing unexpected results.

If you specify a shorthand property (for example, {{cssxref("background")}}, all of its longhand sub-properties that can be animated will be.

{{cssbox("transition-property")}}

Syntax

Formal syntax: {{csssyntax("transition-property")}}
transition-property: none
transition-property: all
transition-property: test_05
transition-property: -specific
transition-property: sliding-vertically

transition-property: test1
transition-property: test1, animation4
transition-property: all, height, all
transition-property: all, -moz-specific, sliding

transition-property: inherit

Values

none
No properties will transition.
all
All properties that can have an animated transition will do so.
IDENT
A string identifying the property to which a transition effect should be applied when its value changes. This identifier is composed by case-insensitive letter a to z, numbers 0 to 9, an underscore (_) or a dash(-). The first non-dash character must be a letter (that is no number at the beginning of it, even preceded by a dash). Also two dashes are forbidden at the beginning of the identifier.

Examples

There are several examples of CSS transitions included in the main CSS transitions article.

Specifications

Specification Status Comment
{{SpecName('CSS3 Transitions', '#transition-property', 'transition-property')}} {{Spec2('CSS3 Transitions')}}  

Browser compatibility

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

See also

Revision Source

<div>
  {{CSSRef}} {{SeeCompatTable}}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>transition-property</code> CSS property is used to specify the names of CSS properties to which a <a href="/en-US/docs/Web/CSS/CSS_transitions">transition effect</a> should be applied.</p>
<div class="note">
  <strong>Note:</strong> The set of properties that can be animated is subject to change; as such, you should avoid including any properties in the list that don't currently animate, because someday they might, causing unexpected results.</div>
<p>If you specify a shorthand property (for example, {{cssxref("background")}}, all of its longhand sub-properties that can be animated will be.</p>
<div>
  {{cssbox("transition-property")}}</div>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/Web/CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("transition-property")}}
</pre>
<pre>
transition-property: none
transition-property: all
transition-property: test_05
transition-property: -specific
transition-property: sliding-vertically

transition-property: test1
transition-property: test1, animation4
transition-property: all, height, all
transition-property: all, -moz-specific, sliding

transition-property: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>none</code></dt>
  <dd>
    No properties will transition.</dd>
  <dt>
    <code>all</code></dt>
  <dd>
    All properties that can have an animated transition will do so.</dd>
  <dt>
    <code>IDENT</code></dt>
  <dd>
    A string identifying the property to which a transition effect should be applied when its value changes. This identifier is composed by case-insensitive letter <code>a</code> to <code>z</code>, numbers <code>0</code> to <code>9</code>, an underscore (<code>_</code>) or a dash(<code>-</code>). The first non-dash character must be a letter (that is no number at the beginning of it, even preceded by a dash). Also two dashes are forbidden at the beginning of the identifier.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>There are several examples of CSS transitions included in the main <a href="/en-US/docs/Web/CSS/CSS_transitions">CSS transitions</a> article.</p>
<h2 id="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 Transitions', '#transition-property', 'transition-property')}}</td>
      <td>{{Spec2('CSS3 Transitions')}}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="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</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
        <td>{{CompatGeckoDesktop("2.0")}} {{property_prefix("-moz")}}<br />
          {{CompatGeckoDesktop("16.0")}}</td>
        <td>10</td>
        <td>11.6{{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">#</a></td>
        <td>{{CompatVersionUnknown}} {{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>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
        <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
        <td>{{CompatGeckoMobile("2.0")}} {{property_prefix("-moz")}}<br />
          {{CompatGeckoMobile("16.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/Web/Guide/CSS/Using_CSS_transitions">Using CSS transitions</a></li>
  <li>{{domxref("TransitionEvent")}}</li>
  <li>{{CSS_Reference:transitions}}</li>
</ul>
Revert to this revision