Skip to content

Instantly share code, notes, and snippets.

@ipetepete
Created January 22, 2013 18:01
Show Gist options
  • Save ipetepete/4596705 to your computer and use it in GitHub Desktop.
Save ipetepete/4596705 to your computer and use it in GitHub Desktop.
Info block
/* Info block */
body{
background: #fff;
}
.info_graf{
perspective: 500px;
perspective-origin-x: 0px;
display: inline-block;
margin-top: 30px;
margin-left: 30px;
}
.info_block{
transition: all 0.5s ease-in;
display: inline-block;
width: 1.8em;
height: 2em;
background: #ffb400;
font-family: "Helvetica", sans-serif;
font-size: 5em;
line-height: 2em;
color: #fff;
position: relative;
z-index:1;
}
.info_block label{
font-size: 16px;
display: block;
width:100%;
clear:both;
color:#fff;
text-align: center;
top: -1.2em;
position: relative;
}
.info_block:before{
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
z-index: 2;
border: 22px solid #fff;
border-right-color: transparent;
border-left: 0px solid transparent;
border-bottom-color: transparent
}
.info_block.comments:after{
content: "\f086";
display: block;
position:absolute;
top:0;
z-index: -1;
color:hsl(35, 80%, 58%);
font-family: "FontAwesome";
font-size:170%;
text-align: center;
text-shadow: 0px 0px 0px transparent !important;
width: 100%;
}
.info_block:hover{
transition: all 0.5s ease-in;
width: 130%;
text-shadow: 10px 0px 8px rgba(0,0,0,0.3);
transform: rotateY(-50deg);
left:-26%;
}
.info_block:hover:after{
text-shadow: none;
}
.info_block:hover label{
font-size: 16px;
}
<!-- content to be placed inside <body>…</body> -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<aside class="info_graf">
<section class="info_block comments">
135<label>Comments</label>
</section>
</aside>
// alert('Hello world!');
{"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