123.tooltip-container {4 color: #ffffff;5 --background: #00a36d;6 position: relative;7 background: var(--background);8 cursor: pointer;9 transition: all 0.2s;10 font-size: 17px;11 padding: 0.7em 1.8em;12 border-radius: 50px;13}14.tooltip {15 background-color: #00a36d;16 position: absolute;17 top: 0;18 left: 50%;19 transform: translateX(-50%);20 padding: 0.3em 0.6em;21 opacity: 0;22 pointer-events: none;23 transition: all 0.3s;24 border-radius: 50px;25}26.tooltip::before {27 background-color: #00a36d;28 position: absolute;29 content: "";30 height: 0.6em;31 width: 0.6em;32 bottom: -0.2em;33 left: 50%;34 transform: translate(-50%) rotate(45deg);35}36.tooltip-container:hover .tooltip {37 top: -100%;38 opacity: 1;39 visibility: visible;40 pointer-events: auto;41}
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
.tooltip-container {
color: #ffffff;
--background: #00a36d;
position: relative;
background: var(--background);
cursor: pointer;
transition: all 0.2s;
font-size: 17px;
padding: 0.7em 1.8em;
border-radius: 50px;
}
.tooltip {
background-color: #00a36d;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
padding: 0.3em 0.6em;
opacity: 0;
pointer-events: none;
transition: all 0.3s;
border-radius: 50px;
}
.tooltip::before {
background-color: #00a36d;
position: absolute;
content: "";
height: 0.6em;
width: 0.6em;
bottom: -0.2em;
left: 50%;
transform: translate(-50%) rotate(45deg);
}
.tooltip-container:hover .tooltip {
top: -100%;
opacity: 1;
visibility: visible;
pointer-events: auto;
}
You need to sign in before you can write a comment.