-
Notifications
You must be signed in to change notification settings - Fork 105
/
elijahgummer_slimy-bobcat-84.html
45 lines (40 loc) · 1.12 KB
/
elijahgummer_slimy-bobcat-84.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
<div class="tooltip-container">
<span class="tooltip">Uiverse.io</span>
<span class="text">Tooltip</span>
</div>
<style>
/* From Uiverse.io by elijahgummer - Tags: simple, tooltip, animation, blue, modern, transition */
.tooltip-container {
--background: #22d3ee;
position: relative;
background: var(--background);
cursor: pointer;
transition: background 0.3s;
font-size: 17px;
padding: 0.7em 1.8em;
}
.tooltip {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%) translateY(-10%); /* Adjusted the initial position */
opacity: 0;
pointer-events: none;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
background: var(--background);
color: #fff;
border-radius: 0.3em;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
text-align: center;
font-size: 14px;
width: 120%; /* Adjusted the width */
padding: 0.5em 1em; /* Adjusted padding */
white-space: nowrap; /* Prevent text wrapping */
}
.tooltip-container:hover .tooltip {
top: -100%; /* Adjusted the tooltip position */
opacity: 1;
pointer-events: auto;
transform: translateX(-50%) translateY(0);
}
</style>