Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 10.4 — Filters, Blend Modes and Masks
CSS · Example 3 of 4

Frosted glass and blend modes

Remove backdrop-filter and the stripes show sharply through the panel. Change difference to multiply, screen or overlay and compare: white with multiply disappears entirely.

filter applies photo effects such as blur, grayscale and drop shadows to an element, backdrop-filter applies them to what's behind it, mix-blend-mode mixes its colours with the content underneath, and clip-path and mask hide parts of it with a shape or an image.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make every image inside .gallery grey and slightly dark, and show its real colours when hovered, with a 0.3s transition.

02

Make a .badge cut into a triangle pointing right, using clip-path.

03

Fade out the right-hand edge of a horizontally scrolling .chips row with a mask, so it hints there is more to scroll.

Explain it without notes

01

What does filter do, and why does the order of filter functions matter?

02

When would you use drop-shadow() instead of box-shadow?

03

How does backdrop-filter differ from filter, and what does it need to be visible?

04

What is mix-blend-mode, and what problem does isolation: isolate solve?

05

Compare clip-path and mask-image.

Frosted glass and blend modes

Preview

Press Run to see the page.

Console

Nothing logged yet.