CSS Filters — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the CSS Filters 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
Blur an element
easy10 minApply a 4px blur to #box.
- 2
Desaturate an element
easy10 minApply 50% grayscale to #box.
- 3
Chain two filters
easy10 minBrighten #box by 1.5 and double its contrast.
- 4
Add a drop shadow
easy10 minApply a red drop-shadow 2px right, 2px down, 4px blur.
- 5
Build a vintage look
medium10 min70% sepia followed by 1.2 saturation.
Find the bug(5)
- 1
Fix the blur with no unit
easy8 minA blur radius needs a length.
- 2
Fix the British spelling
easy8 minThe filter function is grayscale.
- 3
Fix the comma between filters
easy8 minChained filter functions are separated by spaces.
- 4
Fix box-shadow used as a filter
easy8 minA filter shadow uses the drop-shadow function.
- 5
Fix the filter on the wrong element
easy8 minThe box should be filtered, 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