Wulan’s glass price card over a batik cloth: write a backdrop-filter and drag the card, then see what is behind it, that backdrop filtered, and the card’s own…
Why it matters
Translucent headers, blurred modal backdrops, glassmorphism cards: all of them are this one property. What trips people up: a solid background hides the effect, one bad value gets the whole declaration dropped, and older Safari needs -webkit-.
The key idea
backdrop-filter filters what is behind, then the element is painted on top
Common mistakes
backdrop-filter is on but the glass effect does not show Check two things. A solid background: the filter runs, but the background is painted over its result, so use a see-through colour like rgba(255, 255, 255, 0.25). Or the value is invalid (say blur(8) without a unit): the whole declaration is dropped and getComputedStyle reads none.
Works in Chrome, plain in Safari Safari before version 18 only knows -webkit-backdrop-filter. While you still support older Safari, write both with the same value: -webkit-backdrop-filter first, then backdrop-filter.
The page gets heavy from backdrop-filter on a large area The browser reworks every pixel behind the element whenever what is behind it changes, such as while scrolling. A smaller area and a smaller blur are lighter; for a still modal backdrop a small blur (4px) is enough.
Try it in this playground
Drag the card over the BATIK TULIS title Only the part behind the card’s box blurs. Tiles 1–3 follow and show that part.
Switch the property to filter Now the card blurs, its writing with it, and the cloth is sharp.
Drag the background alpha to 100% The filter still runs, but the solid background is painted over it, so the effect disappears from view.
Type blur(8) without px The browser drops the whole declaration: getComputedStyle reads none.