JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<a class="tooltips" href="https://evernote.com">
Hi Christine!
<span>Blarghhhh boo!</span>
</a>
</div>
CSS
.container {
position: relative;
margin: auto;
width: 500px;
line-height: 150px;
text-align: center;
}
a.tooltips {
position: relative;
display: inline;
}
a.tooltips span {
position: absolute;
width: 140px;
color: #FFFFFF;
background: #000000;
height: 30px;
line-height: 30px;
text-align: center;
visibility: hidden;
border-radius: 6px;
border: 1px solid red;
}
a.tooltips span:before, /*new*/
a.tooltips span:after {
content: '';
position: absolute;
top: 100%;
left: 50%;
margin-left: -8px;
width: 0;
height: 0;
border-left: 1px solid green; /*new*/
/*
* THIS CODE MAKES THE TRIANGLE
*/
border-top: 8px solid #000000;
border-right: 8px solid transparent;
border-left: 8px solid transparent;
}
a.tooltips span {
visibility: visible;
opacity: 0.8;
bottom: 30px;
left: 50%;
margin-left: -76px;
z-index: 999;
}