JSFiddle - React, Tailwind, and code Playground
HTML
<!doctype html>
<html lang="en">
<head>
<title>Example</title>
</head>
<body>
<main>
<a href="#" data-tooltip="Привет!">Первый пример</a>
<a href="#" data-tooltip="Мир!">Второй пример</a>
</main>
</body>
</html>
SCSS
main {
padding: 200px !important;
display: block;
font-family: sans-serif;
font-size: 14px;
}
[data-tooltip] {
position: relative;
&:after {
content: attr(data-tooltip);
font-size: 12px;
line-height: 20px;
height: 20px;
display: inline-block;
padding: 0 7px;
background: rgba(#000, .5);
border-radius: 2px;
position: absolute;
bottom: 30px;
left: 50%;
transform: translate(-50%, 0);
pointer-events: none;
opacity: 0;
transition: transform .3s ease, opacity .3s ease;
color: #fff;
box-shadow: 1px 2px 3px 1px rgba(#000, .2);
}
&:hover:after {
transform: translate(-50%, 10px);
opacity: 1;
transition: transform .2s ease .4s, opacity .2s ease .4s;
}
}