Backgrounds✨ Premium

Glass Mesh Card

Colourful animated mesh of five blurred radial gradients topped by a glassmorphism card — backdrop-filter, semi-transparent fill and pearlescent border.

CSSGlassComposant

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Backgrounds has 50 effects, including 6 free. Explore the category →

3 usage examples

Feature card — Hero section with central glassmorphism — Glass Mesh Card example 1

① Feature card — Hero section with central glassmorphism

WhenIn a landing page or SaaS hero section when the card itself is the focal element (title, subtitle, CTA) rather than a decorative background — the setup that simultaneously shows the animated mesh, the frosted blur, and the pearlescent border.
WhyPlacing the card at centre stage reveals all three effect layers at once: the coloured mesh behind, the backdrop-filter transparency, and the pearlescent border — everything that distinguishes Glass Mesh Card from a plain animated gradient.
SettingsSet `.glass-mesh-wrapper` to `width: 460px; height: 300px; border-radius: 24px`, `margin: 18px; padding: 28px` on `.glass-mesh-card`, `backdrop-filter: blur(22px)`, `animation-duration: 10s` (code default).
Pricing card — SaaS subscription plans — Glass Mesh Card example 2

② Pricing card — SaaS subscription plans

WhenIn a two- or three-column pricing grid, each card carrying its own gradient palette to visually differentiate tiers without extra illustrations.
WhyA different animated background per plan (blue-cyan for Starter, violet-pink for Pro) brands each tier at a glance. The frosted glass keeps prices legible on any colour.
Settings`height: auto`, `padding: 32px`, `blur(28px)` on the card, adapt the five `rgba()` in the background to the plan's colour.
Profile widget — User dashboard — Glass Mesh Card example 3

③ Profile widget — User dashboard

WhenIn a dashboard or profile page to replace a flat block and display avatar, name and stats with a personalised visual identity.
WhyThe background gradients can echo the dominant colours of the user's avatar, making each profile card visually unique without extra rendering overhead.
Settings`width: 300px`, `animation-duration: 8s`, `blur(16px)` on the card, gradients derived from the profile's primary colour.

How it works

The mesh background is built from five radial-gradient layers stacked inside a single .glass-mesh-bg element. Each gradient anchors a vivid colour at a fixed position (20% 30%, 80% 25%, 50% 80%…) and fades to transparent over 45–50% of its radius. Layering five semi-transparent blobs produces an organic colour patch with no sharp edges.

A filter: blur(25px) melts the stack into a soft, glowing spread. The element overflows its parent via inset: -30% so blurring never exposes white edges at the corners — the wrapper's overflow: hidden clips the excess cleanly.

The CSS animation glassMeshAnim (10 s, ease-in-out, alternate infinite) translates, rotates and gently scales the background beneath the card. The alternate direction reverses the motion at each cycle — no visible jump, no abrupt loop.

The .glass-mesh-card applies backdrop-filter: blur(20px) to blur the coloured layer showing through behind it. Its rgba(255, 255, 255, .08) fill and rgba(255, 255, 255, .15) border deliver the frosted-glass look of glassmorphism, deepened by a box-shadow that amplifies perceived depth.

Accessibility

  • prefers-reduced-motion: not implemented in the source code — the CSS animation runs regardless of the system preference. Add @media (prefers-reduced-motion: reduce) { .glass-mesh-bg { animation: none; } } when integrating.
  • Text inside .glass-mesh-card (<h3> and <p>) is standard semantic HTML, fully readable by screen readers without any extra layer.
  • White text contrast on the glassmorphic card: ratio ≥ 7:1 against a dark background (#0a0a0f, WCAG AAA). On lighter backgrounds, verify contrast after glassmorphism depending on the integration context.
  • The structure uses an <h3>: adjust the heading level (<h2>, <h4>…) to match the target page outline.
  • No keyboard interaction in the base code — the effect is purely decorative. Interactive elements added inside the card (buttons, links) must manage their own :focus-visible.

Browser compatibility

Requires backdrop-filter and CSS animations — supported in all modern browsers. No external dependency, zero JavaScript.

Chrome 76+✓ Full
Firefox 103+✓ Full
Safari 14+✓ Full
Edge 79+✓ Full
Mobile iOS 14+✓ Full
Android Chrome 87+✓ Full

Without <code>backdrop-filter</code> (Firefox < 103 without a flag), the card keeps its semi-transparent fill but without blur — text remains legible and the animated colour mesh is unaffected.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="glass-mesh-wrapper">
  <div class="glass-mesh-bg"></div>
  <div class="glass-mesh-card">
    <div class="glass-dots">
      <div class="glass-dot"></div>
      <div class="glass-dot"></div>
      <div class="glass-dot"></div>
    </div>
    <h3>Card title</h3>
    <p>Card description or content</p>
  </div>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
mesh colours Pink, cyan, orange, green, violet Replace the five rgba(…) values in the background of .glass-mesh-bg — each colour anchors one pole of the animated patch.
filter: blur() on .glass-mesh-bg 25px Increase (≥ 35 px) to blend colours more, decrease (≤ 12 px) for sharper, more saturated zones.
animation-duration on .glass-mesh-bg 10s Duration of one half-cycle. 6–8 s = dynamic feel, 14–20 s = almost imperceptible drift.
inset on .glass-mesh-bg -30% Overflow beyond the container. Increase if blurring exposes white edges at the corners.
backdrop-filter on .glass-mesh-card blur(20px) Frosted-glass blur. blur(10px) = translucent glass, blur(32px) = near-opaque frosted pane.
background on .glass-mesh-card rgba(255,255,255,.08) White fill opacity. 0 = fully transparent, 0.18–0.25 = more opaque glass, easier to read on saturated backgrounds.
border on .glass-mesh-card 1px solid rgba(255,255,255,.15) Colour and opacity of the pearlescent border. Raise alpha (0.3–0.5) for a visible rim, or tint the colour for coloured glass.

FAQ

Yes — each .glass-mesh-wrapper is self-contained. Copy the HTML block as many times as needed. The glassMeshAnim keyframe is defined once in CSS and shared by all instances without conflict. Differentiate cards by overriding the background of each .glass-mesh-bg via an inline style attribute or a utility class.
backdrop-filter: blur() is GPU-accelerated on modern Chrome, Edge and Safari — the impact is negligible on a single element. Avoid stacking three levels of backdrop-filter or applying it to an element covering more than 50% of the screen. On Firefox < 103, it is silently ignored (fallback without blur, text still readable).
Add @media (prefers-reduced-motion: reduce) { .glass-mesh-bg { animation: none; } } to your stylesheet — the effect does not include this natively. For programmatic control: document.querySelector('.glass-mesh-bg').style.animationPlayState = 'paused'.