Create the frosted-glass look with live sliders for blur, transparency, color, saturation, border and shadow. Drag the card over a colorful background or your own image, then copy clean CSS, Tailwind classes or a ready HTML snippet.
Presets
Glass card
Frosted glass blurs whatever sits behind it. Drag me around.
Get started
Background
Your browser does not support backdrop-filter, so the blur is not visible here. The CSS still works in current browsers.
Advertisement
Advertisement
How to use the Glassmorphism CSS Generator
Pick a preset or start from the default frosted card.
Move the sliders: blur softens what is behind the card, transparency sets how much tint shows, saturation makes colors behind it pop.
Change the background or upload an image to test the effect on your real design. Drag the card to see it over different areas.
Adjust the border and shadow to give the glass a crisp edge and depth.
Copy the CSS, Tailwind classes or HTML snippet and paste it into your project.
How the glass effect works
Four CSS properties work together. background with an alpha value (for example rgba(255, 255, 255, 0.2)) gives the light tint. backdrop-filter: blur() blurs everything painted behind the element, which creates the frosted look, and saturate() in the same filter boosts the colors that shine through. A thin, semi-transparent white border imitates the light catching the glass edge, and a soft box-shadow lifts the card off the page.
Setting
CSS
Typical range
Blur
backdrop-filter: blur(12px)
8–20px
Transparency
background: rgba(255, 255, 255, 0.2)
0.1–0.4 for light glass
Saturation
saturate(180%)
120–200%
Border
1px solid rgba(255, 255, 255, 0.3)
opacity 0.2–0.5
Shadow
0 8px 32px rgba(0, 0, 0, 0.1)
opacity 0.05–0.25
Design tips
Give it something to blur. Glass only reads as glass over color: gradients, blurred shapes or photos. On a plain white page it just looks gray.
Keep text readable. Increase the tint opacity or switch to dark glass with light text when the background is busy. Aim for a contrast ratio of at least 4.5:1 for body text.
Use it sparingly. Glass works best for a few floating layers such as navigation bars, modals and cards, not for every element.
Provide a fallback. Wrap the effect in @supports (backdrop-filter: blur(1px)) { … } and use a more opaque background otherwise, and consider @media (prefers-reduced-transparency: reduce) where supported.
Frequently asked questions
What is glassmorphism?
Glassmorphism is a UI style where cards look like frosted glass: a semi-transparent background, a blur of whatever is behind the element, a subtle light border and a soft shadow. It became popular with macOS Big Sur, Windows 11 (Acrylic and Mica) and iOS.
Which CSS property creates the frosted glass effect?
backdrop-filter: blur() blurs the content behind an element. It only shows when the element's own background is partly transparent, for example background: rgba(255, 255, 255, 0.2). Adding saturate() to the same backdrop-filter makes the colors behind it more vivid.
Does backdrop-filter work in all browsers?
Yes in current versions of Chrome, Edge, Firefox (since version 103) and Opera. Safari supports it with the -webkit-backdrop-filter prefix, and since Safari 18 without it too. That is why the generated CSS includes both lines.
Why is my glass effect not showing?
Common causes are a fully opaque background on the element, nothing colorful behind it to blur, or a parent with overflow or transform rules that change the backdrop. Make sure the background color uses rgba() or a hex color with alpha and that there is an image or gradient behind the card.
Is glassmorphism accessible?
It can be if text contrast stays high. Use enough tint (higher opacity) or a dark glass with light text, avoid busy backgrounds behind small text, and check contrast with a color contrast checker. Consider a solid fallback for users who enable reduced transparency.
Does backdrop-filter hurt performance?
Blurring is done by the GPU and is fine for a few elements. Very large blur radii, many overlapping glass layers or animating them on low-end phones can reduce frame rate, so keep blur moderate and the number of glass elements small.