Last active
August 29, 2015 14:10
-
-
Save rlfrahm/c90c9f7aee2605e3fa9f to your computer and use it in GitHub Desktop.
CSS3 Activity spinner
This file contains hidden or 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
<div class="loader"> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
</div> | |
<style> | |
.loader { | |
position: relative; | |
padding-top: 100px; | |
width: 40px; | |
margin: auto; | |
} | |
.loader .circle { | |
position: absolute; | |
width: 38px; | |
height: 38px; | |
-webkit-animation: orbit 2s infinite; | |
animation: orbit 5.5s infinite; | |
} | |
.loader .circle:after { | |
content: ''; | |
position: absolute; | |
width: 5px; | |
height: 5px; | |
border-radius: 5px; | |
background: #286090; /* Pick a color */ | |
} | |
.loader .circle:nth-child(2) { -webkit-transform: rotate(72deg); } | |
.loader .circle:nth-child(3) { -webkit-transform: rotate(144deg); } | |
.loader .circle:nth-child(4) { -webkit-transform: rotate(216deg); } | |
.loader .circle:nth-child(5) { -webkit-transform: rotate(288deg); } | |
@-webkit-keyframes orbit { | |
0% { -webkit-transform:rotate(0); | |
-webkit-animation-timing-function: linear; } | |
50% { -webkit-transform:rotate(180deg); | |
-webkit-animation-timing-function: linear; } | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment