The CSS transition-timing-function property describes how the intermediate values used during a transition will be calculated. In order words it describes transition effects like ease, linear, etc.
CSS property transition-timing-function
CSS version: | CSS 3 |
Value: | single-transition-timing-function [, single-transition-timing-function]* |
single-transition-timing-function: | ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(integer[, [ start | end ] ]?) | cubic-bezier(number, number, number, number) |
Initial: | ease |
Applies to: | all elements, :before and :after pseudo elements |
Inherited: | no |
Example – transition-timing-function
In the following code, CSS property transition-timing-function can be changed to the following values
- ease
- linear
- ease-in
- ease-out
- ease-in-out
- step-start
- step-end
<style type="text/css"> div { width: 100px; background-color: lightblue; transition-property: width; transition-duration: 2s; transition-timing-function: ease; } div:hover { width: 200px; } </style> <div> Hover me to see transition of width </div>
transition-timing-function refresh
Related
- CSS transition - animation effect when properties change
- CSS transition-property
- CSS transition-duration
- CSS transition-delay
Specification and Browser compatibility
Specification | Status | Categories |
---|---|---|
CSS3 Transitions | W3C Working Draft | CSS3 |
Chrome | Firefox | IE | Edge | Safari | Opera |
---|---|---|---|---|---|
Yes 26+ | Yes 16+ | Yes 10+ | Yes 12+ | Yes 6.1+ | Yes 12.1+ |
Android Chrome | Android Firefox | iOS Safari | IE Mobile | Opera Mobile |
---|---|---|---|---|
Yes 47+ | Yes 44+ | Yes 7.0-7.1+ | Yes 10+ | Yes 12.1+ |
source: caniuse.com