Attach the spin keyframes to #box.
Acceptance criteria
- 1.Attach the spin keyframes to #box.
CSS Tutorial · CSS Animations & Transitions
These 10 tasks go with the CSS Animations chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “CSS Animations allow elements to change styles automatically over time without requiring JavaScript.” Read the chapter.
1.Name the animationexercise · easy · 10 min
Attach the spin keyframes to #box.
Passes when: Attach the spin keyframes to #box.
2.Set the durationexercise · easy · 10 min · practice plan
Run the animation on #box over 2 seconds.
Passes when: Run the animation on #box over 2 seconds.
3.Loop foreverexercise · easy · 10 min · practice plan
Repeat the animation on #box indefinitely.
Passes when: Repeat the animation on #box indefinitely.
4.Alternate directionexercise · easy · 10 min · practice plan
Make each repetition run in the opposite direction.
Passes when: Make each repetition run in the opposite direction.
5.Hold the final frameexercise · medium · 10 min · practice plan
Keep the end state after the animation finishes.
Passes when: Keep the end state after the animation finishes.
6.Fix the duration with no unitbug fix · easy · 8 min
A duration needs s or ms.
Passes when: A duration needs s or ms.
7.Fix the invalid iteration countbug fix · easy · 8 min · practice plan
Endless repetition uses the keyword infinite.
Passes when: Endless repetition uses the keyword infinite.
8.Fix the fill modebug fix · easy · 8 min · practice plan
The value is forwards, with an s.
Passes when: The value is forwards, with an s.
9.Fix the direction valuebug fix · easy · 8 min · practice plan
The value is alternate.
Passes when: The value is alternate.
10.Fix the name that does not matchbug fix · easy · 8 min · practice plan
The animation name must match the @keyframes name.
Passes when: The animation name must match the @keyframes name.
Between them these tasks cover @keyframes, animation-name and duration and Iteration and direction.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.