Created
July 16, 2014 07:27
-
-
Save codedependant/8bb05eb6082e1c17ce7c to your computer and use it in GitHub Desktop.
Animated pie chart - style loader with CSS
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
/** | |
* Animated pie chart - style loader with CSS | |
*/ | |
.pie { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background: yellowgreen; | |
background-image: linear-gradient(-90deg, currentColor 50%, transparent 0); | |
color: #655; | |
} | |
@keyframes spin { | |
to { transform: rotate(.5turn); } | |
} | |
@keyframes bg { | |
50% { background: currentColor; } | |
} | |
.pie:before { | |
content: ''; | |
display: block; | |
margin-left: 50%; | |
height: 100%; | |
border-radius: 0 100% 100% 0 / 50%; | |
background-color: inherit; | |
transform-origin: left; | |
animation: spin 3s linear, | |
bg 6s step-end; | |
} |
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
<div class="pie"></div> |
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
// alert('Hello world!'); |
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","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment