TANE-be ANIMATION
CSS & SVG Layered Wave Animation
Four translucent SVG wave layers drift at different speeds, giving a header background gentle, parallax-like depth. Pure CSS animation — no JavaScript.
- Built with
- Published
Where to use it
- Header and hero backgrounds
- Section dividers
- Brand sites with a calm, ocean-like mood
How it works
- One wave path is defined once in the SVG defs and reused four times with the use element
- Each layer has its own vertical offset and a white fill at a different opacity (0.7, 0.5, 0.3, and solid) to build depth
- A single CSS keyframe animation slides each layer sideways with translate3d in an infinite loop
- Different durations (14s, 22s, 28s, 35s) and negative delays keep the layers out of step for a parallax feel
- preserveAspectRatio="none" stretches the waves across any screen width
Make it your own
- Wave color and opacity
- Number of layers
- Speed of each layer (animation-duration)
- Wave height
Before you ship
- Mobile & touch
- The SVG stretches to the screen width, and the waves are taller on small screens (150px) than on large ones (70px).
- Browser support
- Uses inline SVG and CSS animations. Works in all modern browsers.
- Performance (load: Low)
- Only transform is animated, and there's no JavaScript at all, so the main thread stays free.
- Accessibility
- The waves are decorative and carry no information; the title is regular HTML text.
- Reduced motion
- With reduced motion enabled, the site-wide reduced-motion styles shorten the animation to almost nothing, so the waves effectively stay still.
FAQ
How do I make layered wave animations with SVG and CSS?
Define one wave path in the SVG defs, reuse it several times with use, and give each copy a different offset, opacity, and animation duration.
Does it need JavaScript?
No. The whole effect runs on CSS keyframes and inline SVG.
How do I change the wave colors?
Change the fill on each use element. Keeping lower opacity on the back layers preserves the sense of depth.