Transitions

suggest change

Syntax

Parameters

Parameter | Details |
––––––––––––– | —— |
transition-property | The specific CSS property whose value change needs to be transitioned (or) all, if all the transitionable properties need to be transitioned. |
transition-duration | The duration (or period) in seconds (s) or milliseconds (ms) over which the transition must take place. |
transition-timing-function | A function that describes how the intermediate values during the transition are calculated. Commonly used values are ease, ease-in, ease-out, ease-in-out, linear, cubic-bezier(), steps(). More information about the various timing functions can be found in the W3C specs.|
transition-delay | The amount of time that must have elapsed before the transition can start. Can be specified in seconds (s) or milliseconds (ms) |

Prefer transitioning an explicit property rather than all:

.notice {
  opacity: 0;
  transition: opacity 180ms ease;
}

.notice.is-visible {
  opacity: 1;
}

Modern browsers support transitions without vendor prefixes. Consider a prefers-reduced-motion rule for nonessential effects.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents