Skip to content

Instantly share code, notes, and snippets.

@marcoslhc
Created April 15, 2014 15:07
Show Gist options
  • Save marcoslhc/10740069 to your computer and use it in GitHub Desktop.
Save marcoslhc/10740069 to your computer and use it in GitHub Desktop.
Pure CSS indicator
/*
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; }
<div class="notification">
<div class="counter red">
<span class="label">1</span>
</div>
</div>
{"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