Skip to content

Instantly share code, notes, and snippets.

@moneal
Created April 5, 2012 01:33
Show Gist options
  • Save moneal/2307214 to your computer and use it in GitHub Desktop.
Save moneal/2307214 to your computer and use it in GitHub Desktop.
CSS BoxSpin
/**
* CSS BoxSpin
* Attempt to remake http://www.cesmes.fi/flash/boxSpin/ in CSS
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
.spinner {
width: 40px;
height: 40px;
display: block;
float: left;
border-radius: 50%;
-webkit-animation-name: spin;
-webkit-animation-duration: 3s; /* 3 seconds */
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
.red {
background-image: -webkit-radial-gradient(45px 45px, circle cover, red, orange);
}
.deg0:hover {
@-webkit-keyframes spin {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
}
<ul>
<li class="spinner red deg0"></li>
</ul>
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment