CSS-Zone

Liquid waves

Layered waves sliding horizontally. Practical example for decorative effects and visual accents with live preview, HTML structure, and production-ready CSS you can integrate quickly.

Preview

HTML + CSS

<div class="liquid">
  <div class="liquid__wave liquid__wave_one"></div>
  <div class="liquid__wave liquid__wave_two"></div>
  <div class="liquid__wave liquid__wave_three"></div>
</div>

<style>
.liquid {
  position: relative;
  width: 220px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), #0b1120);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.liquid__wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 60%;
  background: rgba(59, 130, 246, 0.26);
  opacity: 0.8;
  animation: waveMove 6s linear infinite;
}

.liquid__wave_two {
  height: 70%;
  animation-duration: 7s;
  background: rgba(139, 92, 246, 0.18);
  animation-direction: reverse;
}

.liquid__wave_three {
  height: 50%;
  animation-duration: 5s;
  opacity: 0.4;
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
</style>

What the Liquid waves pattern demonstrates

Liquid waves is a reusable CSS animation pattern that can be integrated into modern UI without external dependencies. The example includes HTML structure and motion styles that are easy to scale for production components.

When this animation pattern is a good fit

Use this effect for state indication, visual focus, or lightweight micro-interactions that support content clarity. Motion should reinforce hierarchy, so keep speed, contrast, and density aligned with your interface goals.

How to implement it in production safely

Copy the snippet, adapt spacing and timing to your system tokens, and test behavior on mobile and low-power devices. Add reduced-motion support to keep the component accessible while preserving the same functional meaning.