CSS Transitions — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the CSS Transitions 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
Choose what transitions
easy10 minTransition only the opacity of #box.
- 2
Set a duration
easy10 minGive #box a half-second transition.
- 3
Add a delay
easy10 minDelay the transition on #box by 1 second.
- 4
Set the easing
easy10 minUse ease-in-out on #box.
- 5
Use the shorthand
medium10 minTransition opacity over 300ms, linear, after a 1s delay.
Find the bug(5)
- 1
Fix the duration with no unit
easy8 minA duration needs s or ms.
- 2
Fix the swapped times
easy8 minThe duration comes first, the delay second.
- 3
Fix the invalid easing
easy8 minThat is not a built-in timing function.
- 4
Fix the misspelled property name
easy8 minThe transitioned property is opacity.
- 5
Fix the transition with no duration
easy8 minA transition with no duration is instant.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace