JSFiddle - React, Tailwind, and code Playground
HTML
<!-- Begin Social -->
<ul class="social-links">
<li><a href="http://www.facebook.com/joe.hirst.353" class="tooltip" title="Find me on Facebook!"><img src="http://joe-hirst.com/images/facebook.png" alt="Facebook"></a>
</li>
<li><a href="https://twitter.com/joehirstdesign" class="tooltip" title="Follow me on Twitter!"><img src="http://joe-hirst.com/images/twitter.png" width="24" height="24" alt="Twitter"></a>
</li>
</ul>
<!-- ENDS Social -->
CSS
ul {
display: inline;
}
/*
* Tooltip CSS V1.0
* By Joseph Hirst
* V1.0
* BETA
*/
.tooltip {
display: inline;
position: relative;
}
/* On hover */
.tooltip:hover:after {
background: #333;
background: rgba(0, 0, 0, .8);
border-radius: 5px;
top: 10px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 125px;
}
.tooltip:hover:before {
border: solid;
border-color: #333 transparent;
opacity:1.0;
border-width: 0px 6px 6px 6px;
bottom: 5px;
content:"";
left: 50%;
position: absolute;
z-index: 99;
}
/* Firefox tooltip gap correction */
<!--[if Gecko]> .tooltop:hover:after {
top: 8px;
}
.tooltip:hover:before {
bottom: 4px;
}
<![endif]-->