CSS Property animation-timing-function

The Associate in Nursingimation-timing-function property is employed to specify a temporal orderoperatethat defines the speed over time of an object being animated. It describes howeverAssociate in Nursing animation can progress over one cycle of its period, permitting it to vary speed throughout its course.

A temporal arrangement perform in CSS is sometimes cited easing functions.

The animation-timing-function takes a temporal arrangement perform as a price, that could be a function that specifies the speed over time of associate object being animated. It may be outlined exploitation one amongst many predefined keywords for common temporal arrangement functions.

If you apply over one animation on a component, you will specify multiple temporal arrangement functions, every for a corresponding animation nominal exploitation the animation-name property.

The temporal arrangement perform nominal applies to every iteration of the animation, not the whole animation fully. for instance, if associate animation has animation-timing-function: ease-in-out; and animation-iteration-count: 2;, it’ll ease in at the beginning, ease out because it approaches the tip of its initial iteration, ease in at the beginning of its second iteration, and ease out once more because it approaches the tip of the animation.

For keyframed animations, the temporal arrangement perform applies between keyframes instead of over the whole animation. In different words, the temporal arrangement perform is applied at the beginning of a keyframe and at the tip of a keyframe.

In addition to having the ability to specify a temporal arrangement perform for associate overall animation, you’ll be able to specify associate associateimation temporal arrangement perform for a private keyframe of the animation within the keyframe rule that’s wont to animate the component in this keyframe because it yield to consecutive keyframe (See the Examples section below for an example). If no temporal arrangement perform is nominal for the keyframe, the temporal arrangement perform nominal for the animation is employed. you’ll be able to browse additional concerning this associated see an example within the @keyframes entry.

It is sometimes additional convenient to specify the animation-timing-function within the animation shorthand property.


.element {
    animation-name: rotate, fall;
    animation-timing-function: ease-in, ease-in-out;

Desktop Browser Support

Mobile Browser Support

Leave a Reply