Created
January 27, 2012 10:08
-
-
Save colourgarden/1688098 to your computer and use it in GitHub Desktop.
Spinning timer
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
/** | |
* Spinning timer | |
*/ | |
html{ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; | |
} | |
body{margin: 200px;} | |
.circle{ | |
position: absolute; | |
display: block; | |
left: 50%; | |
margin-left: -50px; | |
top: 40%; | |
animation: rotate 4s infinite linear; | |
} | |
s{ | |
position: relative; | |
display: block; | |
width: 100px; | |
height: 50px; | |
background: #fff; | |
} | |
s:first-child{ | |
border-radius: 100px 100px 0 0; | |
animation: offset-alpha 2s infinite 1s; | |
} | |
s:last-child{ | |
border-radius: 0 0 100px 100px; | |
animation: offset-beta 2s infinite; | |
} | |
@keyframes rotate { | |
to{ transform: rotate(720deg) } | |
} | |
@keyframes offset-alpha { | |
33%{ transform: translate(25px) } | |
66%{ transform: translate(-25px) } | |
} | |
@keyframes offset-beta { | |
33%{ transform: translate(-25px) } | |
66%{ transform: translate(25px) } | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<span class="circle"> | |
<s></s> | |
<s></s> | |
</span> |
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","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment