How to Create Glassmorphism Effects in CSS
Glassmorphism with backdrop-filter, current browser support, and what the blur costs: scrolling under six glass cards in headless Chromium dropped from 60 to 29 frames per second at 8px blur and 18 at 64px.
The Basic Glass Effect
.glass {
background: rgb(255 255 255 / 0.12);
-webkit-backdrop-filter: blur(16px); /* Safari 9-17 */
backdrop-filter: blur(16px);
border: 1px solid rgb(255 255 255 / 0.2);
border-radius: 16px;
}
backdrop-filter blurs whatever is painted behind the element, the translucent background tints it, and a faint border marks the edge. MDN's compatibility data lists unprefixed support in Chrome 76, Edge 79, Firefox 103 and Safari 18; Safari 9-17 read only the -webkit- form, so keep both lines while you support them. Over a flat color there is nothing to blur, so the effect only reads over images, gradients or other content.
What the Blur Costs: Measured
Blur is rendered every time the content behind the glass changes, so scrolling under fixed glass panels is the expensive case. We scrolled a page for 3 seconds under six fixed glass cards in headless Chromium and counted the frames it managed (October 13, 2026; script in our test folder):
| Blur radius | Frames in 3 s | Frame rate |
|---|---|---|
| no backdrop-filter | 181 | 60 fps |
| 8px | 88 | 29 fps |
| 16px | 87 | 29 fps |
| 32px | 77 | 26 fps |
| 64px | 54 | 18 fps |
Headless Chromium rasterizes on the CPU, so a phone with a GPU will do better; the shape of the result is what transfers. Turning the blur on halved the frame rate here, and larger radii cost more on top. Keep glass to small, mostly static elements (a nav bar, a dialog), avoid stacking several blurred layers, and test scrolling on a mid-range phone.
Readability
The background behind glass changes as people scroll, so text contrast changes with it. Check contrast against the lightest and darkest content that can pass behind the panel, not just the design mock-up, and raise the background opacity until the worst case passes 4.5:1. Users can also ask for less transparency: @media (prefers-reduced-transparency: reduce) is supported in Chrome and Edge 118 (Firefox only behind a flag, Safari not yet), so use it to swap the glass for an opaque surface.
@media (prefers-reduced-transparency: reduce) {
.glass { background: rgb(20 22 34); backdrop-filter: none; }
}
The Glassmorphism Generator previews the blur, tint and border over a sample background and copies both the prefixed and unprefixed properties. Our glassmorphism and neumorphism guide measures how glass opacity changes text contrast.
Frequently Asked Questions
What CSS property creates the glassmorphism effect?
Does glassmorphism work in all browsers?
Is glassmorphism accessible?
Use the Glassmorphism Generator โ free, no signup required.
โก Open Glassmorphism Generator