Floating Glassmorphism

0 viewshard
Background:
Floating Glassmorphism Card
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="floating-glassmorphism-card">
  <!-- Floating Background Orbs -->
  <div class="floating-orbs">
    <div class="floating-orb-1"></div>
    <div class="floating-orb-2"></div>
    <div class="floating-orb-3"></div>
  </div>

  <!-- Main Glass Card -->
  <div class="glass-card">
    <div class="glass-reflections"></div>
    <div class="glass-highlight"></div>
    
    <!-- Content -->
    <div class="card-content">
      <div class="header">
        <div class="live-indicator">
          <div class="indicator-dot"></div>
          <span>Live</span>
        </div>
        <h3>Glass Card</h3>
        <p>Floating design</p>
      </div>
      
      <div class="glass-panels">
        <div class="glass-panel panel-1">
          <div class="panel-info">
            <div class="panel-title">Transparency</div>
            <div class="panel-subtitle">Advanced blur effects</div>
          </div>
          <div class="progress-bar"></div>
        </div>
        
        <div class="glass-panel panel-2">
          <div class="panel-info">
            <div class="panel-title">Depth</div>
            <div class="panel-subtitle">Multi-layer composition</div>
          </div>
          <div class="progress-bar"></div>
        </div>
        
        <div class="glass-panel panel-3">
          <div class="panel-info">
            <div class="panel-title">Elevation</div>
            <div class="panel-subtitle">Floating experience</div>
          </div>
          <div class="progress-bar"></div>
        </div>
      </div>
      
      <button class="action-button">Experience Glass</button>
    </div>
  </div>
  
  <!-- Shadow -->
  <div class="ground-shadow"></div>
</div>
Was this helpful?

What is inside Floating Glassmorphism

Floating Glassmorphism is a CSS button built with a keyframe animation, gradient fills, a blurred backdrop, defined in 284 lines across 43 selectors.

46
CSS properties
43
Selectors
284
Lines of CSS
3
Formats

Techniques used

Keyframe animationTransitionsTransformsGradientsShadowsFiltersBackdrop blurPseudo elementsHover stateFlexbox

Animation defined: pulse

CSS properties in this component

-webkit-backdrop-filter-webkit-background-clip-webkit-text-fill-coloralign-itemsanimationanimation-delaybackdrop-filterbackgroundbackground-clipborderborder-colorborder-radiusbottombox-shadowcolorcontentcursordisplayfilterflexflex-directionfont-sizefont-weightgapheightinsetjustify-contentleftletter-spacingmargin-bottommargin-topopacityoverflowpaddingperspectivepositionrighttext-transformtoptransformtransform-styletransitiontransition-delayuser-selectwidthz-index

Accessibility check2 to fix

  • Built on a native <button> element, so keyboard focus and screen reader semantics work without extra attributes.
  • No focus style is defined. Add one before shipping, or keyboard users lose track of position.
  • Animates without a prefers-reduced-motion guard. Wrap the animation in that query if motion sensitivity matters to your audience.

Browser support notes

  • Backdrop filter needs a -webkit- prefix on older Safari.

These notes are generated by reading this component's own source, so they describe what it actually does rather than what a template says. Copy the code above in HTML, CSS, Tailwind and adapt it freely.

About Floating Glassmorphism

Floating Glassmorphism is a card built with a keyframe animation, gradient fills, transforms, layered shadows, a blurred backdrop, CSS filters and pseudo elements. Its stylesheet runs to 284 lines across 43 rules, declaring 46 distinct properties. It styles hover state explicitly, so the component responds to interaction rather than sitting still. The animation is driven by a keyframe sequence named pulse, which you can retime or remove without touching the rest of the styling. Every format shown on this page is the same component, so you can take HTML, CSS and Tailwind depending on how your project is set up. Nothing is minified and nothing depends on a framework.

When to use

How it works

The base rule sets the shape with border-radius, display, height and padding. The fill is a gradient rather than a flat colour, so it is a single background declaration with no image to load. A pseudo element carries part of the effect, which keeps the markup to one element while giving the CSS a second surface to animate. Movement is done with transforms rather than by changing position or size, which is what keeps it smooth: transforms are composited and do not force the browser to lay the page out again. State changes are eased with a transition, so hovering does not snap. The looping motion comes from pulse. Changing the animation-duration is usually the only edit needed to make it faster or calmer. The backdrop filter blurs whatever sits behind the element, which means the effect depends on the page underneath rather than on the component alone.

Accessibility

Keyboard navigation
Supported
Screen reader
Friendly
ARIA
Native element semantics, no extra attributes needed

Built on a native <button> element, so keyboard focus and screen reader semantics work without extra attributes. No focus style is defined. Add one before shipping, or keyboard users lose track of position. Animates without a prefers-reduced-motion guard. Wrap the animation in that query if motion sensitivity matters to your audience. Those are 2 things to fix before this ships in front of users.

Browser support

Chrome
76+
Firefox
103+
Safari
9+
Edge
79+

Backdrop filter needs a -webkit- prefix on older Safari.

Frequently asked questions