Scroll Animations — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Scroll 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
Drive an animation by scroll
easy10 minTie the animation on #box to the scroll progress.
- 2
Use a view timeline
easy10 minTie the animation on #box to its visibility in the viewport.
- 3
Name and drive together
easy10 minAttach the fade keyframes and a scroll timeline.
- 4
Hold the end state
easy10 minUse a view timeline and keep the final frame.
- 5
Build a scroll reveal
medium10 minFade in as the element enters the view, holding both ends.
Find the bug(5)
- 1
Fix the missing parentheses
easy8 minscroll is a timeline function and needs parentheses.
- 2
Fix scroll used where view was meant
easy8 minThis should react to the element entering the viewport.
- 3
Fix the missing animation name
easy8 minA timeline drives nothing without keyframes attached.
- 4
Fix the fill mode
easy8 minBoth ends should be held, not just the last frame.
- 5
Fix the timeline on the wrong element
easy8 minThe animated box needs the timeline, not the wrapper.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace