docs.rodeo

MDN Web Docs mirror

CSS transitions

The CSS transitions module specifies functionality for creating gradual transitions between different CSS property values. The behavior of these transitions can be controlled by specifying their easing function, duration, and other values.

Normally, when the value of a CSS property changes, the result of the change from the old value to the new value is immediate. The CSS transitions module enables controlling a progression from the old property state to the new state over a specified period of time. It also provides event handlers to allow code to be run in response to different stages of a transition being reached.

In certain cases, there is no originating “from” value for a transition. For example, if an element gets added to the DOM, the styles defined are for the “to” state. This module provides the {{cssxref("@starting-style")}}  at-rule, which enables defining starting styles for such cases. The module also defines how discrete property values should be transitioned, such as transitioning the discretely animated {{cssxref("display")}}  property from the none value to a displayed value.

Reference

Properties

At rules

Interfaces

Guides

Specifications

{{Specifications}} 

See also

In this article

View on MDN