Giacomo Balli profile picture

Giacomo Balli

Innovation consultant specializing in mobile strategy

Let's Chat

Animated Pure CSS spinner

This code sample will allow you to include an animated spinner just by using CSS. This makes it extremely lightweight and performant.

<div id="spinner"></div>

#spinner {
width: 150px;
height: 150px;
-webkit-animation: sweep .5s infinite linear;
border-radius: 50%;
border-bottom: 5px solid #0cb2eb;
margin: 20px auto;


- place the HTML wherever you want it to show up.

This snippet focuses on iOS development. Make sure to verify/adapt any vendor prefixes.

Back to main listing.

Published: Mon, 11 Jan 2016 02:55:58 +0000