CSS ease-in-out
Slow at both ends, fast in the middle. ease-in-out reaches 50% of its travel at 50% of the time and 90% at 78%. Its peak speed is 1.72x the average.
Demo
ease-in-out
linear
ease-in-out
linear
Your system asks for reduced motion, so nothing plays. The charts above show the whole move.
Code
animation-timing-function: linear(0, 0.0012, 0.0048, 0.011, 0.0197, 0.0311, 0.0452, 0.0621, 0.0817, 0.104, 0.1292, 0.157, 0.1874, 0.2203, 0.2555, 0.2928, 0.3319, 0.3725, 0.4143, 0.457, 0.5, 0.543, 0.5857, 0.6275, 0.6681, 0.7072, 0.7445, 0.7797, 0.8126, 0.843, 0.8708, 0.896, 0.9183, 0.9379, 0.9548, 0.9689, 0.9803, 0.989, 0.9952, 0.9988, 1);animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'cubic-bezier(0.42, 0, 0.58, 1)', fill: 'both' });animation: slide 600ms ease-in-out;Numbers
- 50% of travel
- 50%of the time
- 90% of travel
- 78%of the time
- After 10% of time
- 1.97%of the travel is done
- Peak speed
- 1.72xtimes the average
- Overshoot
- 0%stays inside the end
- Undershoot
- 0%never below the start
- linear() points
- 41at a 0.002 tolerance
- cubic-bezier
- exactworst gap 0.0 points
Use and avoid
Use for
- Moves between two resting positions: a slide, a camera push, a toggle.
- Looping back-and-forth motion.
Avoid for
- Quick UI feedback: the slow start delays the response.
- Film entrances. Land gives a clearer arrival.
Nearest vawe ease
glide, curve gap 0.0246.