Created
January 21, 2013 21:51
-
-
Save ipetepete/4589817 to your computer and use it in GitHub Desktop.
CSS Percentage infographic
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 Percentage infographic | |
*/ | |
body{ | |
background: #fff; | |
font-size: 16px; | |
} | |
.stats{ | |
background: hsl(253, 34%, 50%); | |
color: hsl(253, 34%, 86%); | |
border: 2px solid hsl(253, 34%, 50%); | |
border-radius: 5px; | |
height: 2em; | |
width: 3em; | |
text-align: center; | |
line-height: 2em; | |
font-size: 2em; | |
position:relative; | |
} | |
.stats:after{ | |
content: attr(data-completed); | |
background: hsl(253, 34%, 100%); | |
color:hsl(253, 34%, 50%); | |
display:block; | |
border-radius: 5px; | |
height: 50%; | |
overflow:hidden; | |
position:absolute; | |
width:3em; | |
top:0px; | |
} |
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> --> | |
<section class="stats" data-completed="50%">50%</section> |
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","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