This challenge animates an element to replicate the movement of a ball being juggled. Prior challenges covered thelinearandease-outcubic Bezier curves, however neither depicts the juggling movement accurately. You need to customize a Bezier curve for this.
Theanimation-timing-functionautomatically loops at every keyframe when theanimation-iteration-countis set to infinite. Since there is a keyframe rule set in the middle of the animation duration (at50%), it results in two identical animation progressions at the upward and downward movement of the ball.
The following cubic Bezier curve simulates a juggling movement:
cubic-bezier(0.3, 0.4, 0.5, 1.6);
Notice that the value of y2 is larger than 1. Although the cubic Bezier curve is mapped on a 1 by 1 coordinate system, and it can only accept x values from 0 to 1, the y value can be set to numbers larger than one. This results in a bouncing movement that is ideal for simulating the juggling ball.
Change value of theanimation-timing-functionof the element with the id ofgreento acubic-bezierfunction with x1, y1, x2, y2 values set respectively to 0.311, 0.441, 0.444, 1.649.