Created
April 5, 2012 01:33
-
-
Save moneal/2307214 to your computer and use it in GitHub Desktop.
CSS BoxSpin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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); } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li class="spinner red deg0"></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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