CSS Text Filling with Water

The key technical trick is the use of the modern background-clip: text property for masking, allowing the animated wave background to shine through the text outline.

See the Pen CSS Text Filling with Water.

Drip Drop Animation

A dynamic, JavaScript-free animation of a water drop falling and rippling, using a specific cubic-bezier easing function to precisely simulate the realistic acceleration and motion of the falling object.

See the Pen Drip Drop Animation.

Water Drop

A pure CSS water drop animation featuring realistic ripples, utilizing a key technical feature: 3D transformation rotateX(75deg) on pseudo-elements to simulate the perspective of expanding concentric circles.

See the Pen Water Drop.

Water Droplets on Window

See the Pen Water Droplets on Window.

Cup Filling with Water CSS Animation

Pure CSS Random Rain with SVG and CSS Variables

A dynamic rain animation built with SVG and CSS variables to achieve efficient randomization of each droplet. This snippet leverages CSS Custom Properties to control speed, opacity, and scale, delivering a realistic weather effect optimized for high frontend performance.

Outline. Pure CSS

See the Pen Outline. Pure CSS.

Underwater Pure CSS Animation

See the Pen Underwater Pure CSS Animation.

Waves

This lightweight demo showcases dynamic, animated waves built entirely with SVG and pure CSS keyframes, eliminating the need for complex JavaScript to create a smooth, scalable visual effect.

See the Pen Waves.

Octocat Sprite Swimming in the Ocean with CSS

Pure CSS Rain

See the Pen Pure CSS Rain.

Simple CSS Waves

See the Pen Simple CSS Waves.

Sunrise Over Still Lake

See the Pen Sunrise Over Still Lake.

Water Wave CSS Effect

See the Pen Water Wave CSS Effect.

Frequently Asked Questions

Why prioritize CSS and SVG filter pipelines for liquid water distortion over JavaScript-driven canvas loops?

CSS and inline SVG displacement filters maintain complete semantic DOM node integrity, ensuring text blocks, buttons, and screen-readers remain fully functional inside the container. Canvas or WebGL pipelines render content onto an opaque, non-semantic pixel buffer, introducing notable script payloads, hydration latency, and clear SEO indexing and accessibility barriers.

How can we keep dynamic water ripple transitions accessible and safe for users with motion sensitivity?

Continuous fluid ripples and waving distortions can trigger vestibular discomfort, cognitive strain, and nausea. Developers must wrap all intensive water-displacement animations inside a @media (prefers-reduced-motion: reduce) block to instantly freeze the coordinates or gracefully degrade to a static fade transition.

Why do liquid SVG distortion filters degrade scrolling performance, and how do we resolve this?

The pixel-shifting mathematical calculations inside SVG feDisplacementMap and feTurbulence primitives require GPU rasterization overhead on every frame. To protect your layout’s INP score, isolate the distorted container with contain: strict, restrict its dimensions, and promote the node using will-change: transform.

How do HSL and OKLCH color spaces improve the rendering of deep water gradients?

The oklch() color space aligns closely with human visual perception, preventing highly saturated ocean blues and teals from turning grey or muddy in the gradient midtones. Pairing this with relative color syntax lets you dynamically shift transparency values to simulate realistic physical light absorption as water depth increases.

What fallback strategy should be used for browser engines that struggle with advanced SVG displacement mapping?

Implement progressive enhancement using an @supports (filter: url('#water-refract')) query to isolate your advanced fluid rules. For legacy browsers, gracefully degrade the liquid distortion to a standard linear CSS transition using basic opacity and scale attributes to maintain complete layout usability.