transition-property
Quick Summary for transition-property

The <strong><code>transition-property</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> property sets the CSS properties to which a <a href="/en-US/docs/Web/CSS/CSSTransitions/UsingCSS_transitions">transition effect</a> should be applied.

Code Usage for transition-property

<pre class="brush: css notranslate"><code><span class="token comment">/ Keyword values /</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> all<span class="token punctuation">;</span> <span class="token comment">/ &lt;custom-ident&gt; values /</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> test_05<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> -specific<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> sliding-vertically<span class="token punctuation">;</span> <span class="token comment">/ Multiple values /</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> test1<span class="token punctuation">,</span> animation4<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> all<span class="token punctuation">,</span> height<span class="token punctuation">,</span> color<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> all<span class="token punctuation">,</span> -moz-specific<span class="token punctuation">,</span> sliding<span class="token punctuation">;</span> <span class="token comment">/ Global values /</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> inherit<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> initial<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> revert<span class="token punctuation">;</span> <span class="token property">transition-property</span><span class="token punctuation">:</span> unset<span class="token punctuation">;</span> </code></pre>

More Details for transition-property

transition-property

The transition-property CSS property sets the 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, as someday they might, causing unexpected results.

If you specify a shorthand property (e.g., background), all of its longhand sub-properties that can be animated will be.

Syntax

/* Keyword values */ transition-property: none; transition-property: all;  /* <custom-ident> values */ transition-property: test_05; transition-property: -specific; transition-property: sliding-vertically;  /* Multiple values */ transition-property: test1, animation4; transition-property: all, height, color; transition-property: all, -moz-specific, sliding;  /* Global values */ transition-property: inherit; transition-property: initial; transition-property: revert; transition-property: unset; 

Values

none

No properties will transition.

all

All properties that can transition will.

<custom-ident>

A string identifying the property to which a transition effect should be applied when its value changes.

Formal definition

Initial valueall
Applies toall elements, ::before and ::after pseudo-elements
Inheritedno
Computed valueas specified
Animation typediscrete

Formal syntax

none | <single-transition-property>#

where <single-transition-property> = all | <custom-ident>

Examples

Simple example

This example performs a four-second font size transition when the user hovers over the element, the transition-property is the font-size.

HTML
<a class="target">Hover over me</a> 
CSS
.target {   font-size: 14px;   transition-property: font-size;   transition-duration: 4s; }  .target:hover {   font-size: 36px; } 

You will find more examples of transition-property included in the main CSS transitions article.

Specifications

Specification
CSS Transitions Level 2 # transition-property-property

See also

Using CSS transitions transition transition-duration transition-timing-function transition-delay TransitionEvent Select your preferred language English (US)DeutschEspañolFrançais日本語中文 (简体) Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote

james clear
Latest News
## 🚀 AI Giants Hit Bullseye: Anthropic & OpenAI Achieve Product-Market Fit Anthropic and OpenAI have reached a significant milestone, finding product-market fit with their AI technologies, which means their products effectively meet the needs of their customers, driving growth and adoption. This achievement showcases the practical value of their innovations, enabling businesses and individuals to leverage AI for enhanced productivity and efficiency. With this alignment of product and market needs, these companies are poised to transform industries and shape the future of technology.