May 06, 2021 CSS Reference Manual
The transition-timing-function property specifies the speed at which the effect is switched.
This property allows a transition effect to change the speed of its duration.
Default: | ease |
---|---|
Inherited: | no |
Version: | CSS3 |
JavaScript syntax: | object .style.transitionTimingFunction="linear" |
Value | Describe |
---|---|
linear | Specifies the transition effect (equal to cubic-bezier (0,0,1,1)) that starts and ends at the same speed. |
ease | Specify the transition effect of starting slowly, then getting faster, and then ending slowly (0.25, 0.1, 0.25, 1). |
ease-in | Specifies the transition effect that starts slowly (equal to cubic-bezier (0.42, 0, 1, 1)). |
ease-out | Provides for a transition effect that ends slowly (equal to cubic-bezier (0,0,0.58,1)). |
ease-in-out | Provides for transition effects that start and end slowly (equal to cubic-bezier (0.42, 0,0.58,1). |
cubic-bezier( n , n , n , n ) | Define your own values in the cubic-bezier function. The possible values are values between 0 and 1. |
The numbers in the table support the first browser version number of the property.
The number immediately before -webkit-, -ms- or -moz- is the first browser version number that supports the prefix property.
Attributes | |||||
---|---|---|---|---|---|
transition-timing-function |
26.0
4.0 -webkit- |
10.0 |
16.0
4.0 -moz- |
6.1
3.1 -webkit- |
12.1
10.5 -o- |
The transition effect starts and ends at the same speed:
To better understand the different function values: here are five different div elements, with five different values:
As in the example above, but specify the velocity curve cubic Bezier curve function: