A lightweight loading spinner built with nothing but CSS. It uses a circular border with one coloured edge and a single @keyframes rotation — so it's fast, crisp on any screen, and works without JavaScript or image files.
How it works
The circle is a div with a transparent border on three sides and a solid colour on the top edge. The spin keyframe rotates it 360° infinitely, which makes the coloured edge appear to travel around the ring.
How to use it
- Copy the code and drop it into any HTML page.
- Change
border-top-colorto match your brand. - Adjust
width/heightfor a bigger or smaller spinner. - Speed it up or slow it down by changing the
1sanimation duration.