-
Notifications
You must be signed in to change notification settings - Fork 105
/
Quezaquo_bitter-wolverine-27.html
105 lines (94 loc) · 1.78 KB
/
Quezaquo_bitter-wolverine-27.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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<div class="container">
<span class="hover-me">Hover me !</span>
<div class="tooltip">
<p>Heyy👋</p>
</div>
</div>
<style>
/* From Uiverse.io by Quezaquo - Tags: simple, tooltip, transition */
.container {
font-size: 18px;
color: #333;
position: relative;
cursor: pointer;
display: inline-block;
}
.hover-me {
position: relative;
z-index: 1;
text-decoration: underline;
text-underline-offset: 4px;
text-decoration-color: #333;
}
.tooltip {
width: 100%;
height: 10px;
background: #ffffff;
padding: 0.25em;
text-align: center;
position: absolute;
top: 40px;
left: 0;
opacity: 0;
visibility: hidden;
transform-origin: center top;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05);
transition: opacity 0.3s ease-in-out;
}
.tooltip::before {
content: "";
position: absolute;
bottom: -8px;
left: 80%;
transform: translateX(-50%);
border-width: 8px 7px 0;
border-style: solid;
border-color: #ffffff transparent transparent transparent;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05);
}
.tooltip p {
margin: 0;
color: #333;
font-weight: 600;
}
.container:hover .tooltip {
top: -10px;
opacity: 1;
visibility: visible;
animation: goPopup 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}
.container:hover .tooltip p {
animation: bounce 2s ease-in-out infinite;
}
@keyframes goPopup {
0% {
transform: translateY(0) scaleY(0);
opacity: 0;
}
50% {
transform: translateY(-50%) scaleY(1.2);
opacity: 1;
}
100% {
transform: translateY(-100%) scaleY(1);
border-radius: 8px;
opacity: 1;
height: 40px;
}
}
@keyframes bounce {
0%,
20%,
50%,
80%,
100% {
transform: translateY(0);
}
40% {
transform: translateY(-3px);
}
60% {
transform: translateY(-2px);
}
}
</style>