Skip to content

Instantly share code, notes, and snippets.

@Diliprocks1986
Created June 2, 2016 07:24
Show Gist options
  • Save Diliprocks1986/875c33fc00316a393a1ffa576d66723d to your computer and use it in GitHub Desktop.
Save Diliprocks1986/875c33fc00316a393a1ffa576d66723d to your computer and use it in GitHub Desktop.
Facebook
<div>
<a href="#"><span>Facebook</span></a>
</div>
body {
background-color:#d34c65;
text-align:center;
}
div {
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform:translate(-50%,-50%);
}
a {
color:#fff;
background: #DB6E82;
border-radius:4px;
text-align:center;
text-decoration:none;
font-family:fontawesome;
position: relative;
display: inline-block;
width:40px;
height:28px;
padding-top:12px;
margin:0 2px;
transition: all .5s;
}
a:hover {
background: #ef92a3;
}
a span {
color:#666;
position:absolute;
font-family:sans-serif;
bottom:0;
left:-25px;
right:-25px;
padding:5px 7px;
z-index:-1;
font-size:14px;
border-radius:2px;
background:#fff;
visibility:hidden;
opacity:0;
transition: all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
a span:before {
content:'';
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
position:absolute;
bottom:-5px;
left:40px;
}
a:hover span {
bottom:50px;
visibility:visible;
opacity:1;
}
a:nth-of-type(1):before {
content:'\f09a';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment