← All elements

Rolling Liquid Gauge

by @admin · 14 views

<div class="pc-liquid" role="img" aria-label="Filling up"></div>

About this wave

A circular gauge where two rotating rounded squares behind an overflow-hidden circle make a rising, rolling liquid surface.

How it works

Inside an overflow-hidden circle sit two large rounded squares. Each one rotates slowly, which makes its curved top edge look like a rolling wave, and a second keyframe raises it from near the bottom to 30 percent from the top. Two layers with different colours and speeds give the surface depth.

Ways to customise it

  • Change the two rgba colours for another liquid.
  • Change the 30 percent end position to set the fill level.
  • Change the 7s and 9s spin durations for calmer or livelier waves.

Good to know

The gauge is decorative and loops between empty and full, so connect the fill level to your data if it should show a real value. The aria-label should describe the state, not just say it is filling.

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More in Wave

View all →