In CSS animations, theanimation-timing-functionproperty controls how quickly an animated element changes over the duration of the animation. If the animation is a car moving from point A to point B in a given time (youranimation-duration), theanimation-timing-functionsays how the car accelerates and decelerates over the course of the drive.
There are a number of predefined keywords available for popular options. For example, the default value isease, which starts slow, speeds up in the middle, and then slows down again in the end. Other options includeease-out, which is quick in the beginning then slows down,ease-in, which is slow in the beginning, then speeds up at the end, orlinear, which applies a constant animation speed throughout.
For the elements with id ofball1andball2, add ananimation-timing-functionproperty to each, and set#ball1tolinear, and#ball2toease-out. Notice the difference between how the elements move during the animation but end together, since they share the sameanimation-durationof 2 seconds.