-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop-tooltip.html
53 lines (53 loc) · 1017 Bytes
/
top-tooltip.html
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
50
51
52
53
<!DOCTYPE html>
<html>
<style>
/* This is for tooltip Container */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
/* This is for tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 1s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent;
}
/* Show the tooltip text when you
mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
<body>
<h2>Tooltip Example</h2>
<p>Move the mouse over the
text below:</p>
<div class="tooltip">Hover over me
<span class="tooltiptext">
This is Tooltip</span>
</div>
</body>
</html>