/    Sign up×
Reference /Pin to ProfileBookmark

The transition property is a shorthand property that combines up to four of the following properties:

Syntax

The value of the transition-duration property must always be specified, or else it will default to 0s, and the transition will not have any effect. The full syntax is as follows:
transition: property duration timing-function delay|initial|inherit;

div.tran {
  transition: color .25s ease 25ms;
}

Values

transition-property
Designates the name of the CSS property for which the transition effect is for.

transition-duration
Designates the number of seconds (s) or milliseconds (ms) the transition effect takes to complete.

transition-timing-function
Designates the speed curve of the transition effect.

transition-delay
Designates when the transition effect begins.

initial
Sets the property to its default value.

inherit
Inherits this property’s value from its parent item.

Browser Compatibilty

Demos

Have a code example of transition? Submit a codepen.io demo and we'll showcase it here

to submit a demo.
CSS
×

Success!

Help @reference spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...