-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtool-tip.html
More file actions
82 lines (70 loc) · 1.83 KB
/
tool-tip.html
File metadata and controls
82 lines (70 loc) · 1.83 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=
, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
height: 100vh;
background: linear-gradient(rgb(100, 241, 100),rgb(76, 236, 223));
}
.wrapper {
position: relative;
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
}
.container{
position: relative;
padding: 7px;
font-size: 25px;
font-weight: 700;
cursor: pointer;
}
.tooltip{
position: absolute;
left: 50%;
top:0;
transform: translateX(-50%);
background: #000;
color:white;
white-space: nowrap;
padding: 10px 15px;
visibility: hidden;
opacity: 0;
border-radius: 7px;
transition: opacity 0.5s ease;
}
.tooltip:before{
content: '';
position: absolute;
left: 50%;
top: 100%;
transform: translateX(-50%);
border-radius: 15px solid;
border-color: #000 #0000 #000000 #0000;
}
.container:hover .tooltip{
top:-130%;
visibility: visible;
opacity: 1;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="container">
<span class="tooltip">Tooltip Text</span>
<span>Hover Me</span>
</div>
</div>
</body>
</html>