CSSMar 20, 2026 ยท Updated Oct 13, 2026 ยท 3 min read

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.

๐Ÿ”ฎ
Try the Glassmorphism Generator
Free, no signup
โ†’
DG
Derek Giordano
Designer & Developer
In this guide
01The Basic Glass Effect02What the Blur Costs: Measured03Readability

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 radiusFrames in 3 sFrame rate
no backdrop-filter18160 fps
8px8829 fps
16px8729 fps
32px7726 fps
64px5418 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?+
backdrop-filter: blur() is the core property. Combined with a semi-transparent background color and a subtle border, it creates the frosted glass look. Always include the -webkit- prefix for Safari support.
Does glassmorphism work in all browsers?+
backdrop-filter is supported in Chrome, Edge, Safari, and Firefox (since version 103). It works in all modern browsers. Always include -webkit-backdrop-filter for Safari compatibility.
Is glassmorphism accessible?+
It can be, but requires care. Text on glass surfaces must meet WCAG contrast requirements against the worst-case background behind the glass. Test with the Contrast Checker and consider adding a slightly more opaque background to ensure readability.
Try it yourself

Use the Glassmorphism Generator โ€” free, no signup required.

โšก Open Glassmorphism Generator
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.