Skip to content

Instantly share code, notes, and snippets.

@old-campos
Created March 3, 2013 02:52
Show Gist options
  • Select an option

  • Save old-campos/5074271 to your computer and use it in GitHub Desktop.

Select an option

Save old-campos/5074271 to your computer and use it in GitHub Desktop.
A CodePen by Francisco Campos.
<ul class="tt-wrapper">
<li><a class="tt-gplus" href="#"><span>Google Plus</span></a></li>
<li><a class="tt-twitter" href="#"><span>Twitter</span></a></li>
<li><a class="tt-dribble" href="#"><span>Dribble</span></a></li>
<li><a class="tt-facebook" href="#"><span>Facebook</span></a></li>
<li><a class="tt-linkedin" href="#"><span>LinkedIn</span></a></li>
</ul>
.tt-wrapper li a {
display: block;
width: 68px;
height: 70px;
margin: 0 2px;
margin-top: 50px;
outline: none;
background: transparent url(http://tympanus.net/TipsTricks/CSS3Tooltips/images/growcase_the_social_gunman_icons.png) no-repeat top left;
position: relative;
float: left;
}
.tt-wrapper li .tt-gplus {
background-position: 0px 0px;
}
.tt-wrapper li .tt-twitter {
background-position: -68px 0px;
}
.tt-wrapper li .tt-dribble {
background-position: -136px 0px;
}
.tt-wrapper li .tt-facebook {
background-position: -204px 0px;
}
.tt-wrapper li .tt-linkedin {
background-position: -272px 0px;
}
.tt-wrapper li a span {
width: 100px;
height: auto;
line-height: 20px;
padding: 10px;
left: 50%;
margin-left:64px;
font-family: "Alegreya SC", Georgia, serif;
font-weight: 400;
font-style: italic;
font-size: 14px;
color: #719DAB;
text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
text-align: center;
border: 4px solid #FFF;
background: rgba(255,255,255,0.3);
text-indent: 0px;
border-radius: 5px;
position: absolute;
pointer-events: none;
bottom: 100px;
opacity: 0;
box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
transition: all 0.3s ease-in-out;
}
.tt-wrapper li a span:before,
.tt-wrapper li a span:after {
content: "";
position: absolute;
bottom: 15px;
left: 50%;
margin-left: -9px;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid rgba(0,0,0,0.1);
}
.tt-wrapper li a span:after {
bottom: -14px;
margin-left: -10px;
border-top: 10px solid #FFF;
}
.tt-wrapper li a:hover span {
opacity: 0.9;
bottom: 70px;
}
@old-campos

Copy link
Copy Markdown
Author

CSS needs refining, the a:hover tooltip is off in terms of positioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment