Apply a 4px blur to #box.
Acceptance criteria
- 1.Apply a 4px blur to #box.
CSS Tutorial · CSS Effects
These 10 tasks go with the CSS Filters 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: “The CSS Filter property is used to apply visual effects to elements, especially images.” Read the chapter.
1.Blur an elementexercise · easy · 10 min
Apply a 4px blur to #box.
Passes when: Apply a 4px blur to #box.
2.Desaturate an elementexercise · easy · 10 min · practice plan
Apply 50% grayscale to #box.
Passes when: Apply 50% grayscale to #box.
3.Chain two filtersexercise · easy · 10 min · practice plan
Brighten #box by 1.5 and double its contrast.
Passes when: Brighten #box by 1.5 and double its contrast.
4.Add a drop shadowexercise · easy · 10 min · practice plan
Apply a red drop-shadow 2px right, 2px down, 4px blur.
Passes when: Apply a red drop-shadow 2px right, 2px down, 4px blur.
5.Build a vintage lookexercise · medium · 10 min · practice plan
70% sepia followed by 1.2 saturation.
Passes when: 70% sepia followed by 1.2 saturation.
6.Fix the blur with no unitbug fix · easy · 8 min
A blur radius needs a length.
Passes when: A blur radius needs a length.
7.Fix the British spellingbug fix · easy · 8 min · practice plan
The filter function is grayscale.
Passes when: The filter function is grayscale.
8.Fix the comma between filtersbug fix · easy · 8 min · practice plan
Chained filter functions are separated by spaces.
Passes when: Chained filter functions are separated by spaces.
9.Fix box-shadow used as a filterbug fix · easy · 8 min · practice plan
A filter shadow uses the drop-shadow function.
Passes when: A filter shadow uses the drop-shadow function.
10.Fix the filter on the wrong elementbug fix · easy · 8 min · practice plan
The box should be filtered, not the wrapper.
Passes when: The box should be filtered, not the wrapper.
Between them these tasks cover blur and grayscale, Chaining filters and drop-shadow.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.