JSFiddle - React, Tailwind, and code Playground
by Michel Munzert
HTML
<br>
<text class="highcharts-plot-band-label" data-tooltip="safd-sdaf">fdsf</text>
CSS
.highcharts-plot-band-label {
position: relative;
text-decoration: none;
}
.highcharts-plot-band-label:after {
content: attr(data-tooltip);
position: absolute;
bottom: 130%;
left: 20%;
background: #ffcb66;
padding: 5px 15px;
color: black;
-webkit-border-radius: 10px;
-moz-border-radius : 10px;
border-radius : 10px;
white-space: nowrap;
opacity: 0;
/* At time of this creation, only Fx4 doing pseduo transitions */
-webkit-transition: all 0.4s ease;
-moz-transition : all 0.4s ease;
}
.highcharts-plot-band-label:before {
content: "";
position: absolute;
width: 0;
height: 0;
border-top: 20px solid #ffcb66;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
/* At time of this creation, only Fx4 doing pseduo transitions */
-webkit-transition: all 0.4s ease;
-moz-transition : all 0.4s ease;
opacity: 0;
left: 30%;
bottom: 90%;
}
.highcharts-plot-band-label:hover:after {
bottom: 100%;
}
.highcharts-plot-band-label:hover:before {
bottom: 70%;
}
.highcharts-plot-band-label:hover:after, .highcharts-plot-band-label:hover:before {
opacity: 1;
}
JavaScript
// Braucht man nicht! Juhu!