Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. transition-timing-function

transition-timing-function

Specifies the 'timing and progression of the animation' for 'transition'.

Depending on the browser version, it may not work without vendor prefixes such as 'webkit', 'moz', 'ms', etc., so it is safer to include vendor prefixes when using this property. Also, note that the animation may be choppy depending on the PC specs.

Sample Code

transition: 0.5s;
-webkit-transition: 0.5s;
-moz-transition: 0.5s;
-ms-transition: 0.5s;

transition-timing-function: ease;
-webkit-transition-timing-function: ease;
-moz-transition-timing-function: ease;
-ms-transition-timing-function: ease;

Available Values

ValueEffect
easeSmooths the motion near the start and end. If 'transition-timing-function' is omitted, this 'ease' is applied by default.
linearChanges at a constant speed.
ease-inSlows down near the start of the animation.
ease-outSlows down near the end of the animation.
ease-in-outSlows down near both the start and end of the animation.
step-startImmediately jumps to the final state. (No animation)
step-endRemains in the initial state without changing. (No animation)

Browser Display Result

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: ease;
	-webkit-transition-timing-function: ease;
	-moz-transition-timing-function: ease;
	-ms-transition-timing-function: ease;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: linear;
	-webkit-transition-timing-function: linear;
	-moz-transition-timing-function: linear;
	-ms-transition-timing-function: linear;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: ease-in;
	-webkit-transition-timing-function: ease-in;
	-moz-transition-timing-function: ease-in;
	-ms-transition-timing-function: ease-in;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: ease-out;
	-webkit-transition-timing-function: ease-out;
	-moz-transition-timing-function: ease-out;
	-ms-transition-timing-function: ease-out;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: ease-in-out;
	-webkit-transition-timing-function: ease-in-out;
	-moz-transition-timing-function: ease-in-out;
	-ms-transition-timing-function: ease-in-out;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: step-start;
	-webkit-transition-timing-function: step-start;
	-moz-transition-timing-function: step-start;
	-ms-transition-timing-function: step-start;
}
div:hover {
	width: 300px;
}

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: step-end;
	-webkit-transition-timing-function: step-end;
	-moz-transition-timing-function: step-end;
	-ms-transition-timing-function: step-end;
}
div:hover {
	width: 300px;
}

Browser Compatibility

Chrome Chrome
26+
25
24
23
22
21
20
19
18
↑ Requires prefix '-webkit-'
Firefox Firefox
16+
15
14
13
12
11
10
9
8
↑ Requires prefix '-moz-'
3 and earlier ×
Safari Safari
9+
8
7
6
5
4
↑ Requires prefix '-webkit-'
2 and earlier ×
Edge Edge
12+
Supported in all versions
IE IE
11
10
9 ×
8 ×
7 ×
6 ×
Opera Opera
12.1+
10 and earlier ×
iOS Safari iOS Safari
9+
8
7
6
5
4
3
2
↑ Requires prefix '-webkit-'
1 and earlier ×
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data is based on MDN / Can I Use.

Details

Specifies the 'timing and progression of the animation' for 'transition'.

In addition to the preset values such as 'ease' and 'linear', you can also use 'cubic-bezier()' to specify the timing of changes in detail. This uses a cubic Bezier curve — also used in graphic software like Illustrator to draw curves — to specify the progression of the animation.
'cubic-bezier(P0, P1, P2, P3)'
Change the values 'P0', 'P1', 'P2', and 'P3' to vary the timing. The values must be between '0' and '1'; values outside this range are invalid.

div {
	background: #f00;
	width: 200px;
	transition: 1s;
	-webkit-transition: 1s;
	-moz-transition: 1s;
	-ms-transition: 1s;

	transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
	-webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
	-moz-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
	-ms-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
div:hover {
	width: 300px;
}

If you find any errors or copyright issues, please .