Created
April 15, 2014 15:07
-
-
Save marcoslhc/10740069 to your computer and use it in GitHub Desktop.
Pure CSS indicator
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
/* | |
Pure CSS indicator | |
*/ | |
.counter { | |
display:table; | |
width:52px; | |
height:48px; | |
position:relative; | |
border-radius:3px; | |
} | |
.counter.red { | |
background-color:#E74C3C; | |
border-bottom:solid 4px #C0392B; | |
} | |
.counter.red:after{ | |
border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #E74C3C; | |
} | |
.label { | |
font-size:36px; | |
color:#fff; | |
font-family:Helvetica; | |
font-weight:bolder; | |
text-align:center; | |
display:table-cell; | |
vertical-align: | |
middle; | |
margin: auto; | |
} | |
.counter:after { | |
content: ""; | |
border-style: solid; | |
border-width: 9px 9px 9px 9px; | |
height: 0; | |
position: absolute; | |
left: 52px; | |
top: 16px; | |
width: 0; | |
-webkit-transform: rotate(360deg); | |
} | |
body { padding: 100px; } |
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="notification"> | |
<div class="counter red"> | |
<span class="label">1</span> | |
</div> | |
</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
{"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