Dripping Text
A violet gradient word with five drips hanging from it that stretch by 30% every 2 s, while drops break off and fall continuously at 40 px/s before fading out — two SVG images as pseudo-element backgrounds, pure CSS, zero JavaScript, drips and drops frozen when the user reduces motion.
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



How it works
A single element carries the text: .dripping-text, 4rem (64 px), weight 800, inside .dripping-container, centered on the root .fx-0394-root (#0a0a0f background, at least 300 px tall). The text is painted by its background: a vertical gradient #8b5cf6 → #6366f1 → #4f46e5 clipped to the letter shapes (background: … text, backed by -webkit-background-clip: text), with the text's own color made transparent by -webkit-text-fill-color. The word stays real text: selectable, read by screen readers, replaceable in the HTML.
The drips are the ::after pseudo-element: a 40 px tall band, 80% as wide as the word and centered, starting 20 px above the bottom of the line so it overlaps the foot of the letters. Its background is an SVG image written in the CSS: five narrow ellipses at the 15, 35, 55, 75 and 90% columns, 15 to 25 units long, alternating indigo and violet. preserveAspectRatio='none' stretches the image across the full width of the word: the five drips spread under the letters whatever the word's length (under "LIQUID", 217 px, they cover 173 px and are 6 to 10 px wide). The dripAnim animation stretches them by 30% in height and brings them back over 2 s, with a slight drop in opacity at their longest.
The falling drops are the ::before pseudo-element, placed under the drips, in the same columns. Its background is a second SVG image: five small drops at different heights in a 60 px tile, repeated downward (repeat-y). The dripFall animation slides that tile by 60 px every 1.5 s, continuously: each column releases a drop every 1.5 s, which falls at a constant 40 px/s. A gradient mask (mask-image, transparent → opaque from 25 to 55% → transparent) makes the drop appear under the drip's tip and fades it out about 60 px lower. Nothing is simulated: no gravity, no splash, just two moving images. A scrolling background is repainted every frame, but only over a 173 × 76 px area: measured in Chromium with software rendering, about 0.5 ms of rasterization per frame. 0.7% of the frame's pixels change over 500 ms, identical in Chromium 151, Firefox 153 and WebKit 26.
Accessibility
- Reduced motion: under
prefers-reduced-motion: reduce, a block scoped to.fx-0394-rootstops both pseudo-elements: the drips keep their starting length and the drops stay suspended in place, so the word still drips but nothing moves. Measured: 0% of pixels change over 500 ms in all three engines. - Reading: the word is ordinary text, read as is; the drips and drops are pseudo-elements with no content (
content: ""), skipped by screen readers. Write the word in normal case and set it in capitals withtext-transform: uppercaseif needed: some screen readers spell out all-caps words letter by letter. - Contrast: on the
#0a0a0fbackground, the top of the letters (#8b5cf6) measures 4.66:1, the middle (#6366f1) 4.42:1 and the foot (#4f46e5) 3.14:1. At 64 px and weight 800 this is large text: the threshold is 3:1, met over the full height. If you lighten the background or darken the gradient, measure the bottom of the letters, it fails first. - Use: the effect is meant for a short heading. On a sentence, the five drips spread over the whole line and no longer fall under specific letters; body text should stay plain.
Browser compatibility
Pure CSS: background-clip: text (and its -webkit- form), -webkit-text-fill-color, two data: SVG images, mask-image (and -webkit-mask-image), transform and background-position animations. Zero JavaScript, no dependencies, no SVG filter. Measured in Chromium 151, Firefox 153 and WebKit 26: same drips, same drops, same stop under reduced motion; only the default font's line height differs (74 px versus 65 px in Firefox), which moves drips and drops 9 px along with it.
Without masks (mask-image), the drops stay visible across the whole 76 px band and vanish abruptly at its bottom. Without CSS animations, drips and drops stay fixed under the word. Without background-clip: text, the gradient would fill the word's box: the -webkit- form is there for browsers that only read that one.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0394-root">
<div class="dripping-container">
<div class="dripping-text">LIQUID</div>
</div>
</div>
<!-- drips: .dripping-text::after · falling drops: .dripping-text::before -->
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Word and size (HTML and CSS — text of .dripping-text, font-size: 4rem) |
"LIQUID", 64 px, weight 800 | The drips follow the word's width. As the type grows, the space under the baseline grows too: raise the drips (bottom of ::after, −12 px at 66 px, −6 px at 92 px in Georgia) and the drops (top of ::before) by the same amount. |
Colors (CSS — gradient of .dripping-text, fill of both images) |
#8b5cf6 → #6366f1 → #4f46e5; drips and drops #6366f1 / #8b5cf6 | Inside data: URLs, the hash is written %23: fill='%23c3111c' for #c3111c. Change the same colors in ::after and ::before so each drop matches its drip. |
Drip position and length (CSS — cx and ry of the ellipses in ::after) |
columns 15, 35, 55, 75, 90%; lengths 15 to 25 | Columns are percentages of 80% of the word's width, not letters: with another word, a drip may land between two letters. Move its cx (and the same cx in ::before). A larger ry lengthens the drip, up to 40 (the band's height). |
Drip rhythm (CSS — 2s and scaleY(1.3) in dripAnim) |
2 s, +30% | 3 to 4 s gives a thicker substance (honey, wax); scaleY(1.6) a drip that clearly hangs. The stretch starts from the middle of the band: the drip grows downward and slightly back up into the letters. |
Drop speed and density (CSS — 1.5s and the 60px tile of ::before) |
one drop per column every 1.5 s, 40 px/s | Speed equals the tile's height divided by the duration: 60 px in 1 s gives 60 px/s. For more drops, add ellipses to the tile; keep the same value in background-size and at the end of dripFall, or the fall jumps on every loop. |
Fall length (CSS — height: 76px and mask-image of ::before) |
76 px, visible from 25 to 55% of the band | A 120 px band with a #000 20%, #000 70% mask makes the drops fall twice as far. Leave room under the word: the band extends below the line. |
FAQ
::after image and move the cx of that ellipse, then the same cx in the ::before image so the drop follows.::after and ::before, with no filter property at all: nothing to declare in the HTML, no id to keep unique, no blur cost. The effect therefore works on any background, several times on the same page, and the word stays selectable text.