The core CSS
.glass {
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.3);
}
Three parts do the work:
- A translucent background — without it, nothing shows through
- blur — the frosting itself
- saturate — boosts the colors behind the element, imitating the way glass refracts light
Browser support
| Browser | Support |
|---|---|
| Chrome 76+ | ✅ |
| Safari 9+ | needs the -webkit- prefix |
| Firefox 103+ | ✅ |
Performance caveat
backdrop-filter promotes the element to a GPU compositing layer, so don’t scatter it across large areas or scrolling will drop frames. Where it belongs: navbars, cards, modals.
Going further: a noise overlay
Plain frosted glass looks a little plastic. A layer of SVG noise on top reads as more “real”:
.glass::before {
content: '';
position: absolute;
inset: 0;
background: url('/noise.svg');
opacity: 0.04;
pointer-events: none;
}