-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtooltip.css
49 lines (43 loc) · 1.05 KB
/
tooltip.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* Tooltip container */
.tool {
position: relative;
display: inline-block;
/*border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}
/* Tooltip text */
.tool .tooltip {
visibility: hidden;
width: 120px;
background-color: rgb(255, 255, 0);
color: #000;
text-align: center;
padding: 2px 0;
border-radius: 6px;
/* Position the tooltip text */
position: absolute;
z-index: 1;
bottom: 100%;
left: 50%;
margin-left: -60px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
/* Fade in tooltip */
opacity: 0;
transition: opacity 0.3s;
}
/* Tooltip arrow */
.tool .tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: rgb(255, 255, 0) transparent transparent transparent;
}
/* Show the tooltip text when you mouse over the tool */
.tool:hover .tooltip {
visibility: visible;
opacity: 1;
}