LiquidPremium

Lava Lamp

Three warm blobs (coral red, orange, red) blurred at 20 px rise up to 200 px and sink back over 8 s, 2 s apart, swelling and shrinking, inside a rounded frame that stands for the lamp's glass: a slow ambient light with no merging, pure CSS, frozen at three heights when the user reduces motion.

CSSAnimationBlur

Updated

This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Liquid has 31 effects, including 6 free. Explore the category →

3 usage examples

"Magma 70" lamp — product page of a vintage lighting dealer — Lava Lamp example 1

① "Magma 70" lamp — product page of a vintage lighting dealer

WhenInstead of a still photo, the product box shows the lamp switched on: rounded glass, orange blobs rising, aluminum cap and base; next to it, the period, height, condition, price and buy button.
WhyThe glass frame and the slow 8 s rise recreate the lit lamp, which a photo cannot show. Metaballs merges and bounces too fast for a lamp.
SettingsRoot reduced to 128 × 216 px and set between a cap and a base drawn in CSS; glass rounded at 46 px (.lava-glass at 42 px, 18% outline); blobs moved horizontally (2%, 42%, 24%) to fit the narrow glass; original colors and blur.
"Seventies" room — booking page of a themed guesthouse — Lava Lamp example 2

② "Seventies" room — booking page of a themed guesthouse

WhenRoom thumbnail at the top of the page, in orange and plum tones: glowing blobs float behind the room's name and "2 guests"; below, the amenities, the nightly price and the dates button.
WhyThe warm, slow blur makes ambient light, not an object: it dresses the thumbnail without upstaging the text, and echoes the room's 1970s lighting.
SettingsFull-width thumbnail 206 px tall, 18 px corners, plum background #4a1838 → #1a0716; blobs recolored orange #ff8a3d, amber #ffc15c and rosy plum #d0528c; glass rounded at 14 px; room name with a dark drop shadow so it stays readable when a blob passes behind.
Soul & funk section — category banner of an online record store — Lava Lamp example 3

③ Soul & funk section — category banner of an online record store

WhenTop banner of the category: "Soul & Funk" title, 1968–1979 period, orange and red blobs rising behind it; the record sleeves and their prices below.
WhyThe warm colors and very slow motion set the era without getting in the way of the sleeves; the blobs exit through the top of the banner like stage lights.
Settings540 × 192 px banner with no rounding: .lava-glass reduced to an orange rule at the bottom (border-bottom: 2px solid #ff9f43); blobs at 12%, 52% and 78%; original colors; 38 px title with a drop shadow.

How it works

The root .fx-0396-root holds the glass, .lava-container: at least 300 px tall, overflow: hidden, with a very dark plum gradient #1a0a2e → #0a051a. Inside are three round .lava-blob elements sitting half below the bottom edge: the first one 120 px wide at 20% of the width, the second 80 px at 50%, the third 100 px at 70%. The two large ones use a coral red radial gradient #ff6b6b → #ee5a5a, the small one an orange #feca57 → #ff9f43. All three have filter: blur(20px): their edges dissolve into a glow, which reads as light rather than an object. On top, .lava-glass draws the glass: a white 10% outline, rounded at 100 px, 10 px from the edge, letting the pointer through.

A single animation, lavaMove, over 8 s with ease-in-out, carries all the motion: the blob rises 180 px while swelling to ×1.2, sinks back to 120 px while shrinking to ×0.9, rises to 200 px (×1.1), then drops to the bottom. At each step its eight border-radius radii change (between 40 and 60%): the shape should flatten or stretch, but under a 20 px blur these changes barely show, and what reads is mostly the swelling. The three blobs start with delays of 0, −2 and −4 s: at any moment one is rising, another is sinking, the third sits at the bottom. They never merge: each one is blurred on its own, and their glows overlap without forming a bridge.

The blur has a price, because the animated border-radius forces the browser to repaint the three blobs every frame, blur included. Measured in Chromium 151 with software rendering (no graphics card, the slowest case): about 1.0 ms of rasterization per frame at the sold size, versus 0.16 ms without the blur; the same lamp scaled up four times (blobs of 320 to 480 px, 80 px blur) keeps the raster threads busy for more than 10 s over 3 s of animation and the frame rate drops by half. At the size of a thumbnail or a banner, the cost stays low; for a full-screen background, reduce the blur or the number of blobs.

Accessibility

  • Reduced motion: under prefers-reduced-motion: reduce, a block scoped to .fx-0396-root removes the animation and places the blobs at three fixed heights (150, 90 and 190 px above the edge, with the shape and size of one moment of the loop): the lamp stays lit, nothing moves. Measured: 0% of pixels change over 500 ms in Chromium, Firefox and WebKit (34% without the preference).
  • Decorative content: blobs and glass are empty div elements, skipped by screen readers. If the lamp illustrates a product, describe it in the page text.
  • Text on top: on the plum background, white text measures 18.6:1; but when a blob passes behind it, it drops to 2.8:1 on coral red and 1.5:1 on orange. Keep text out of the blobs' path, or give it a dark drop shadow (text-shadow), like the room name and the banner title in the scenes above.
  • Pace: an 8 s cycle, slow and continuous motion, with no flashing and no sudden change in brightness.

Browser compatibility

Pure CSS: filter: blur(), radial gradients, transform and border-radius animation. Zero JavaScript, no dependencies. Measured in Chromium 151, Firefox 153 and WebKit 26: same motion, same blur, same stop under reduced motion. Cost measured in Chromium with software rendering: 1.0 ms of rasterization per frame at the sold size, frame rate halved once the lamp is scaled up four times.

Chrome 53+✓ Full
Firefox 35+✓ Full
Safari 9.1+✓ Full
Edge 79+✓ Full
Mobile iOS✓ Full
Android Chrome✓ Full, reduce the blur on low-end phones

Without filter: blur (very old browsers), the blobs stay sharp: three red and orange disks rising and sinking while changing shape, which then makes the border-radius changes visible. Without CSS animations, the blobs stay half hidden below the edge of the glass.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0396-root">
  <div class="lava-container" style="width:100%;min-height:300px;">
    <div class="lava-blob"></div> … (3 blobs)
    <div class="lava-glass"></div>
  </div>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Colors (CSS — background of .lava-blob:nth-child(1/2/3)) #ff6b6b → #ee5a5a (1 and 3), #feca57 → #ff9f43 (2) One radial gradient per blob. Blue and green (#4dd2ff, #5ce1a6) give a cool lamp; keep one blob lighter than the others for depth.
Size and position (CSS — width, height, left, bottom of each blob) 120, 80, 100 px; 20, 50, 70%; half below the edge In a narrow glass (a 130 px wide lamp), bring the left values closer (2 to 42%): otherwise the third blob leaves the frame. Keep bottom at minus half the size so the blob starts from the bottom.
Blur (CSS — filter: blur(20px)) 20 px At 8 to 10 px, the border-radius changes become visible and the blob turns back into a drop; at 30 px, a diffuse glow. The painting cost follows the blur radius and the blobs' size.
Speed (CSS — 8s and delays -2s, -4s) 8 s, 2 s apart Keep the delays at a quarter and half of the duration (12 s → −3 and −6 s) so the blobs stay spread through the cycle.
Rise height (CSS — -180px, -120px, -200px in lavaMove) up to 200 px For a 450 px glass, multiply all three values by 1.5. Beyond the glass's height, the blobs leave through the top and can no longer be seen.
Glass (CSS — .lava-glass) white 10% outline, 100 px rounding, 10 px from the edge For a lamp, round it to half the width; for a banner, replace the frame with a single rule (border: 0; border-bottom: 2px solid …).

FAQ

Each blob is blurred separately: when two blobs cross, their glows overlap, but nothing welds them. True merging needs a threshold after the blur, which only an SVG filter or a canvas computation provides: that is what Liquid Morph (a "goo" filter on three drops) and Metaballs (canvas) do. Lava Lamp stays an ambient light, softer and script-free.
Barely. The animation changes the eight border-radius radii between 40 and 60%, but a 20 px blur erases most of those differences: what reads is mostly the swelling (from ×0.9 to ×1.2) and the rise. Lower the blur to 8 to 10 px to see the blob flatten and stretch, at the cost of a sharper, less glowing look.
Fluid Gradient fills the whole frame: four blobs blurred at 40 px slowly rotate behind centered text, it is a background. Lava Lamp shows an object: three blobs rising and sinking inside a rounded glass, like a lamp that is switched on. Pick Lava Lamp for a thumbnail or banner where the lamp should be recognizable; Fluid Gradient for a section background that barely moves.