Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to specify a custom timing functions for CSS transitions?

I use CSS transitions pretty frequently now but find it limiting to only have access to ease-in, ease-out etc. The bezier-curve option appears to allow the most control but even this does not allow you to specify an actual easing equation that would simulate elastic easing etc.. Is there another option or does one need to resort to javascript to perform this type of animation?

like image 496
Jim Jeffers Avatar asked Jun 01 '11 10:06

Jim Jeffers


People also ask

How do I set transition time in CSS?

CSS Transition-Property Here's an example of the syntax: transition-duration: 1s; transition-property: background, color; This will make the background and color transition in 1 second, but nothing else will be transitioned.

What does transition-timing-function do in CSS?

The transition-timing-function property specifies the speed curve of the transition effect. This property allows a transition effect to change speed over its duration.

Which CSS property can be used to specify the amount of time over which a transition takes?

The transition-duration CSS property sets the length of time a transition animation should take to complete.

What is the default transition-timing-function in CSS?

It is defined by a number of steps and a step position. Equal to cubic-bezier(0.25, 0.1, 0.25, 1.0) , the default value, increases in velocity towards the middle of the transition, slowing back down at the end.


1 Answers

You can use Caesar to generate CSS for different equations.

like image 191
alex Avatar answered Oct 22 '22 13:10

alex