Blend #box with what is behind it using multiply.
Acceptance criteria
- 1.Blend #box with what is behind it using multiply.
CSS Tutorial · CSS Effects
These 10 tasks go with the Blending & Backdrop 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: “Blend overlapping content, isolate compositing groups, and filter the pixels behind translucent surfaces. It explains element blending, backdrop blending, isolation, translucent glass surfaces, unprefixed support, contrast, and rendering cost.” .
1.Blend an elementexercise · easy · 10 min
Blend #box with what is behind it using multiply.
Passes when: Blend #box with what is behind it using multiply.
2.Blend background layersexercise · easy · 10 min · practice plan
Blend the background layers of #box with screen.
Passes when: Blend the background layers of #box with screen.
3.Frost the backdropexercise · easy · 10 min · practice plan
Blur whatever sits behind #box by 8px.
Passes when: Blur whatever sits behind #box by 8px.
4.Contain the blendingexercise · easy · 10 min · practice plan
Give #wrap its own stacking context so blending stops there.
Passes when: Give #wrap its own stacking context so blending stops there.
5.Build a frosted panelexercise · medium · 10 min · practice plan
An 8px backdrop blur behind a half-white background.
Passes when: An 8px backdrop blur behind a half-white background.
6.Fix the shortened propertybug fix · easy · 8 min
The property is mix-blend-mode.
Passes when: The property is mix-blend-mode.
7.Fix the wrong blend propertybug fix · easy · 8 min · practice plan
Blending the element's own layers uses background-blend-mode.
Passes when: Blending the element's own layers uses background-blend-mode.
8.Fix filter used for the backdropbug fix · easy · 8 min · practice plan
This should blur what is behind the element.
Passes when: This should blur what is behind the element.
9.Fix the isolation valuebug fix · easy · 8 min · practice plan
The value is isolate.
Passes when: The value is isolate.
10.Fix the blur with no unitbug fix · easy · 8 min · practice plan
A blur radius needs a length.
Passes when: A blur radius needs a length.
Between them these tasks cover mix-blend-mode, backdrop-filter and Isolation.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.