CSS Animations — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the CSS Animations lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Name the animation
easy10 minAttach the spin keyframes to #box.
- 2
Set the duration
easy10 minRun the animation on #box over 2 seconds.
- 3
Loop forever
easy10 minRepeat the animation on #box indefinitely.
- 4
Alternate direction
easy10 minMake each repetition run in the opposite direction.
- 5
Hold the final frame
medium10 minKeep the end state after the animation finishes.
Find the bug(5)
- 1
Fix the duration with no unit
easy8 minA duration needs s or ms.
- 2
Fix the invalid iteration count
easy8 minEndless repetition uses the keyword infinite.
- 3
Fix the fill mode
easy8 minThe value is forwards, with an s.
- 4
Fix the direction value
easy8 minThe value is alternate.
- 5
Fix the name that does not match
easy8 minThe animation name must match the @keyframes name.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace