JSFiddle - React, Tailwind, and code Playground
HTML
<br>
<p>We love using <a href="http://geni.us/sea-salt" data-tool="Buy on Amazon" class="tooltip animate">pink himalayan sea salt</a> for all sorts of dishes.</p>
CSS
a.tooltip{
position: relative;
display: inline;
}
a.tooltip:after{
display: block;
visibility: hidden;
position: absolute;
bottom: 0;
left: 20%;
opacity: 0;
content: attr(data-tool); /* might also use attr(title) */
height: auto;
min-width: 150px;
padding: 5px 5px;
z-index: 999;
color: #fff;
text-decoration: none;
text-align: center;
background: rgba(0,0,0,0.85);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
a.tooltip:before {
position: absolute;
visibility: hidden;
width: 0;
height: 0;
left: 50%;
bottom: 0px;
opacity: 0;
content: "";
border-style: solid;
border-width: 6px 6px 0 6px;
border-color: rgba(0,0,0,0.85) transparent transparent transparent;
}
a.tooltip:hover:after{ visibility: visible; opacity: 1; bottom: 20px; }
a.tooltip:hover:before{ visibility: visible; opacity: 1; bottom: 14px; }
a.tooltip.animate:after, a.tooltip.animate:before {
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}