thsf.net/build/lib/thsf/static/css/tooltip.css

58 lines
1.0 KiB
CSS
Raw Normal View History

2023-04-09 17:29:44 +11:00
.tooltip,
.slot_tooltip {
2023-04-09 06:17:34 +11:00
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: var(--main-color);
2023-04-09 11:12:29 +11:00
color: var(--alt-main-color);
2023-04-09 06:17:34 +11:00
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
2023-04-09 17:29:44 +11:00
bottom: 0;
left: 0;
2023-04-09 06:17:34 +11:00
opacity: 0;
2023-04-09 17:29:44 +11:00
transform: translateX(-25%) translateY(-2em);
2023-04-09 06:17:34 +11:00
transition: opacity 1s;
}
2023-04-09 17:29:44 +11:00
.slot_tooltip .slot_tooltiptext {
2023-04-09 11:12:29 +11:00
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
opacity: 0;
2023-04-09 18:40:48 +11:00
transform: translateX(2em);
2023-04-09 11:12:29 +11:00
transition: opacity 1s;
}
2023-04-09 17:29:44 +11:00
.tooltip .tooltiptext::after,
.slot_tooltip .slot_tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
}
.tooltip:hover .tooltiptext,
.slot_tooltip:hover .slot_tooltiptext {
visibility: visible;
opacity: 1;
font-size: 0.7em;
padding: 0.2em;
}