glassmorphismtocss.comMATERIAL STUDIO / 01

01 / FUNDAMENTALS

How backdrop-filter actually works

Separate the surface from its backdrop. Then change blur, opacity, and the background to see which pixels the filter affects.

INTERACTIVE EXAMPLE

Change it. Observe it.

Open in studio ↗

Material controls affect only this example. They do not replace your saved studio session.

MATERIAL / EXPERIMENT

Keep the idea.
Refine the surface.

Clear text, a translucent fill, and a backdrop you can inspect.

Change a control to inspect the example.

CSS material layout is not included
.glass {
  color: #ffffff;
  background: #34333f;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: #34333f;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
Equivalent Tailwind HTML

Complete class strings for your compiler. This preview uses the equivalent CSS material, not a Tailwind runtime.

<!-- Paste the complete classes into a template scanned by Tailwind. -->
<div class="
  [background:#34333f] [color:#ffffff]
  [border:1px_solid_rgba(255,_255,_255,_0.25)]
  [border-radius:24px]
  [box-shadow:0_14px_40px_rgba(0,_0,_0,_0.2),_inset_0_1px_0_rgba(255,_255,_255,_0.12)]
  supports-[backdrop-filter:blur(1px)]:[background:rgba(255,_255,_255,_0.16)]
  supports-[-webkit-backdrop-filter:blur(1px)]:[background:rgba(255,_255,_255,_0.16)]
  [backdrop-filter:blur(18px)_saturate(140%)]
  [-webkit-backdrop-filter:blur(18px)_saturate(140%)]
  [@media(prefers-reduced-transparency:reduce)]:[background:#34333f]
  [@media(prefers-reduced-transparency:reduce)]:[backdrop-filter:none]
  [@media(prefers-reduced-transparency:reduce)]:[-webkit-backdrop-filter:none]
">
  <!-- Your content -->
</div>

Start with two separate layers

A glass surface is not a blurred photograph. It is a translucent foreground element that filters pixels painted behind it. Text and other children remain sharp. By contrast, filter: blur() blurs the element’s own rendering, including its children. That distinction matters for cards, navigation, and readable controls.

The background color sits on top of the filtered backdrop. At 100% surface opacity, the tinted layer hides the detail underneath even though the filter declaration still exists. At 0%, the filter can remain visible without a colored overlay. This is why blur and opacity deserve independent controls.

Try a controlled experiment

  1. Set opacity to 16% and move blur between 0 and 24 px. Watch the grid behind the card, not the text.
  2. Keep blur at 24 px and increase opacity to 100%. The surface becomes opaque.
  3. Choose Uniform color and reduce opacity again. Increasing blur now produces little visible change because the backdrop has no sharp detail.

Keep the material reusable

The generated CSS below describes the material only. Size, padding, layout, and the background scene belong to your component. Keep those concerns separate so the same material can work on a small card or a navigation bar without exporting a demo-specific layout.

Use a translucent background color rather than setting opacity on the entire component. Component opacity also fades text and children. A background with an alpha channel only controls the fill.

Be aware of the backdrop boundary

The browser filters the backdrop available to the element, up to its nearest backdrop root. Ancestor effects can change that boundary. If the effect differs after moving a card into a new container, inspect the ancestors rather than increasing blur blindly.

Take it into your project

Use Open in studio to continue with the exact material from the example. Keep an opaque fallback, inspect the content underneath, and test text and controls over the final background. A convincing preview is a starting point for integration, not a substitute for it.

Further reading

MDN: backdrop-filter ↗

Copy manually

Your browser blocked clipboard access. Select the text and press Ctrl+C or ⌘C.