SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/liquid-glass

7 CSS Liquid Glass Effects

4 Pure CSS3 with JSPublished 2026-10-05Free · no sign-up

Seven liquid glass components: a card with a specular rim, a button like a drop of glass, a floating tab bar, a slider with a bubble thumb, a home-screen clock widget, a floating editing toolbar and a bottom sheet of thick glass.

01. Liquid Glass Card

Liquid glassCard

The liquid glass look on a card: heavy blur with saturation, a bright specular rim on the top edge, an inner glow and a gradient border that catches light at two corners. All of it is box-shadows and a masked pseudo-element over a colourful background.

View code
<div class="lq1"><span class="o1" aria-hidden="true"></span><span class="o2" aria-hidden="true"></span><article><p class="k">Now playing</p><h3>Glass Garden</h3><p>Aria Lune · 3:42</p></article></div>
.lq1 { position: relative; display: grid; place-items: center; width: 300px; max-width: 100%; height: 240px; overflow: hidden; border-radius: 22px; background: linear-gradient(135deg, #0c4a6e, #1e1b4b); font-family: Inter, system-ui, sans-serif; }
.lq1 span { position: absolute; border-radius: 50%; } .lq1 .o1 { width: 140px; height: 140px; left: 20px; top: 10px; background: #22d3ee; } .lq1 .o2 { width: 130px; height: 130px; right: 10px; bottom: 0; background: #f472b6; }
.lq1 article { position: relative; width: 220px; max-width: 90%; padding: 20px; box-sizing: border-box; border-radius: 24px; background: linear-gradient(180deg, rgba(15,23,42,.35), rgba(15,23,42,.2)); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.12), inset 0 0 22px rgba(255,255,255,.12), 0 16px 34px -14px rgba(0,0,0,.6); color: #fff; }
.lq1 article::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.8), transparent 35%, transparent 65%, rgba(255,255,255,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.lq1 p, .lq1 h3 { margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.35); } .lq1 .k { font-size: 12px; color: #e0f2fe; } .lq1 h3 { margin: 4px 0; font-size: 22px; }

02. Liquid Glass Button

Liquid glassButton

A pill button that looks like a drop of glass: a bright top highlight, a soft inner glow at the bottom and a gentle press that squashes it slightly. The label has a faint shadow and the glass a dark tint, so it stays readable over any background.

View code
<div class="lq2"><button>Continue</button></div>
.lq2 { display: grid; place-items: center; width: 280px; max-width: 100%; height: 160px; border-radius: 22px; background: radial-gradient(circle at 30% 40%, #f97316, transparent 45%), radial-gradient(circle at 70% 60%, #6366f1, transparent 45%), #0f172a; }
.lq2 button { padding: 14px 32px; border: 0; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(15,23,42,.25)); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8); box-shadow: inset 0 1px 1px rgba(255,255,255,.75), inset 0 -6px 12px rgba(255,255,255,.08), 0 10px 20px -10px rgba(0,0,0,.6); color: #fff; font: 700 16px Inter, system-ui, sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.5); cursor: pointer; transition: transform .15s ease; }
.lq2 button:active { transform: scale(.96, .92); }
.lq2 button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .lq2 button { transition: none; } }

03. Liquid Glass Tab Bar

Liquid glassNavigation

A floating tab bar on liquid glass over a bright background, with the selected tab marked by a brighter glass capsule. The tabs are links with aria-current and visible labels, so the glass is decoration over normal navigation.

View code
<div class="lq3"><nav aria-label="App"><a href="#home" aria-current="page"><span aria-hidden="true">⌂</span>Home</a><a href="#browse"><span aria-hidden="true">◎</span>Browse</a><a href="#library"><span aria-hidden="true">▤</span>Library</a></nav></div>
.lq3 { display: grid; align-items: end; justify-items: center; width: 300px; max-width: 100%; height: 220px; padding-bottom: 16px; box-sizing: border-box; border-radius: 24px; background: linear-gradient(#fde68a, #fb923c 45%, #be185d); }
.lq3 nav { display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.45)); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px -12px rgba(0,0,0,.45); font: 600 11px Inter, system-ui, sans-serif; }
.lq3 a { display: grid; justify-items: center; gap: 1px; padding: 6px 14px; border-radius: 999px; color: #431407; text-decoration: none; }
.lq3 a span { font-size: 16px; }
.lq3 a[aria-current] { background: rgba(255,255,255,.85); box-shadow: inset 0 1px 0 #fff; color: #1c1917; }
.lq3 a:focus-visible { outline: 2px solid #1c1917; outline-offset: 1px; }

04. Liquid Glass Slider

Liquid glassRange

A volume slider with a glassy track and a bubble thumb, made by styling a native range input. The thumb's highlight and shadow give the drop-of-glass look while the control keeps full keyboard and screen reader support.

View code
<div class="lq4"><label for="lq4r">Volume</label><input id="lq4r" type="range" min="0" max="100" value="55"></div>
.lq4 { display: grid; gap: 10px; width: 280px; max-width: 100%; padding: 26px 20px; box-sizing: border-box; border-radius: 22px; background: radial-gradient(circle at 20% 50%, #7c3aed, transparent 50%), radial-gradient(circle at 80% 50%, #0e7490, transparent 50%), #0b1020; color: #fff; font: 600 14px Inter, system-ui, sans-serif; }
.lq4 input { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 7px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px 2px rgba(0,0,0,.35), inset 0 -1px 0 rgba(255,255,255,.25); }
.lq4 input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(255,255,255,.6) 40%, rgba(255,255,255,.3)); box-shadow: 0 4px 10px rgba(0,0,0,.5); cursor: pointer; }
.lq4 input::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(255,255,255,.6) 40%, rgba(255,255,255,.3)); box-shadow: 0 4px 10px rgba(0,0,0,.5); cursor: pointer; }
.lq4 input:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }

05. Liquid Glass Clock Widget

Liquid glassWidget

A home-screen widget made of glass showing the time and date, updated every minute. The glass uses a light tint suited to a bright wallpaper, and the time is a time element with a machine-readable value.

View code
<div class="lq5"><div class="w"><time class="t"></time><p class="d"></p></div></div>
.lq5 { display: grid; place-items: center; width: 280px; max-width: 100%; height: 220px; border-radius: 26px; background: linear-gradient(160deg, #a7f3d0, #67e8f9 50%, #c4b5fd); }
.lq5 .w { padding: 18px 22px; border-radius: 26px; background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.35)); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); box-shadow: inset 0 1px 0 #fff, inset 0 0 20px rgba(255,255,255,.35), 0 14px 28px -14px rgba(15,23,42,.4); color: #0f172a; font-family: Inter, system-ui, sans-serif; text-align: center; }
.lq5 .t { display: block; font-size: 44px; font-weight: 300; font-variant-numeric: tabular-nums; }
.lq5 .d { margin: 0; font-size: 13px; font-weight: 600; color: #1e293b; }
function tick() { var n = new Date(), t = document.querySelector('.lq5 .t'); t.textContent = n.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit' }); t.dateTime = n.toISOString(); document.querySelector('.lq5 .d').textContent = n.toLocaleDateString('en-GB', { weekday: 'long', day: 'numeric', month: 'long' }); }
tick(); setInterval(tick, 60000);

06. Liquid Glass Toolbar

Liquid glassToolbar

A floating editing toolbar of round buttons on a glass bar, like the controls that hover over photos in modern apps. It is a toolbar role with named buttons, and the selected tool is shown with a brighter capsule and aria-pressed.

View code
<div class="lq6"><div role="toolbar" aria-label="Edit photo"><button aria-label="Crop" aria-pressed="true">⌗</button><button aria-label="Adjust" aria-pressed="false">◐</button><button aria-label="Filters" aria-pressed="false">✦</button><button aria-label="Markup" aria-pressed="false">✎</button></div></div>
.lq6 { display: grid; place-items: center; width: 300px; max-width: 100%; height: 170px; border-radius: 22px; background: linear-gradient(135deg, #1e3a8a, #9d174d); }
.lq6 [role=toolbar] { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.08)); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 10px 24px -12px rgba(0,0,0,.6); }
.lq6 button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.lq6 [aria-pressed=true] { background: rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.lq6 button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
var bs = document.querySelectorAll('.lq6 button');
bs.forEach(function (b) { b.onclick = function () { bs.forEach(function (x) { x.setAttribute('aria-pressed', x === b); }); }; });

07. Liquid Glass Bottom Sheet

Liquid glassSheet

A glass sheet sliding up over content, with a grab handle and two options. It is a modal dialog for focus handling, and its glass is thick enough that the content underneath blurs into colour instead of competing with the sheet's text.

View code
<div class="lq7"><ul aria-hidden="true"><li></li><li></li><li></li></ul><button class="open">Options</button><dialog aria-label="Options"><span class="g" aria-hidden="true"></span><button>Save to album</button><button>Share</button><button class="c">Cancel</button></dialog></div>
.lq7 { position: relative; display: grid; place-items: center; width: 280px; max-width: 100%; height: 250px; border-radius: 26px; background: linear-gradient(#fef3c7, #fbcfe8); overflow: hidden; font: 15px Inter, system-ui, sans-serif; }
.lq7 ul { position: absolute; inset: 14px; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; } .lq7 li { height: 54px; border-radius: 14px; background: linear-gradient(90deg, #f97316, #db2777); }
.lq7 .open { position: relative; padding: 10px 18px; border: 0; border-radius: 999px; background: #1c1917; color: #fff; font: 700 14px Inter, system-ui, sans-serif; cursor: pointer; }
.lq7 dialog { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; margin: 0; padding: 10px 16px 18px; box-sizing: border-box; border: 0; border-radius: 28px 28px 0 0; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.55)); -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6); box-shadow: inset 0 1px 0 #fff; }
.lq7 dialog[open] { display: grid; gap: 8px; }
.lq7 dialog::backdrop { background: rgba(0,0,0,.15); }
.lq7 .g { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: rgba(28,25,23,.35); }
.lq7 dialog button { padding: 13px; border: 0; border-radius: 14px; background: rgba(255,255,255,.8); color: #1c1917; font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; }
.lq7 .c { background: transparent; color: #9f1239; }
.lq7 button:focus-visible { outline: 2px solid #1c1917; outline-offset: 2px; }
var d = document.querySelector('.lq7 dialog');
document.querySelector('.lq7 .open').onclick = function () { d.showModal(); };
d.querySelectorAll('button').forEach(function (b) { b.onclick = function () { d.close(); }; });

About these CSS Liquid Glass Effects

More than frosted glass

Liquid glass adds depth to plain glassmorphism: a bright highlight along the top edge, an inner glow and a gradient border that catches light at the corners, all from inset box-shadows and a masked pseudo-element.

Blur with saturation

backdrop-filter: blur() saturate() blurs the background and makes its colours richer, which gives the glass its liquid, colourful look.

Tint for the background

Light tints with dark text suit bright wallpapers; darker tints with white text suit colourful dark scenes. Test text on the busiest part of the background.

Glass over real controls

Keep native buttons, links, range inputs and dialogs underneath, so the effect never costs keyboard or screen reader support.

Frequently asked questions

Is this Apple's Liquid Glass?

It is an original CSS take on the glossy glass trend, not a copy of any platform's design.

Does it work without backdrop-filter?

The tints are strong enough to stay readable without blur.

Is it heavy on performance?

Large blurred areas cost more; keep glass to a few elements.