mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
55 lines
No EOL
1.1 KiB
HTML
55 lines
No EOL
1.1 KiB
HTML
<div class="tooltip-container">
|
|
<span class="tooltip">Uiverse.io</span>
|
|
<span class="text">Tooltip</span>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by Dyls00 - Tags: tooltip, smooth, cube, colorful, custom */
|
|
/* This is an example, feel free to delete this code */
|
|
.tooltip-container {
|
|
--background: #ee6d22;
|
|
position: relative;
|
|
background: var(--background);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
border-radius: 15px;
|
|
font-size: 25px;
|
|
padding: 0.7em 1.8em;
|
|
}
|
|
|
|
.tooltip {
|
|
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: 15px;
|
|
font-size: 50px;
|
|
margin-top: 90%;
|
|
background: black;
|
|
}
|
|
|
|
.tooltip::before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 0.6em;
|
|
width: 0.6em;
|
|
bottom: 1.8em;
|
|
left: 50%;
|
|
transform: translate(-50%) rotate(180deg);
|
|
background: var(--background);
|
|
}
|
|
|
|
.tooltip-container:hover .tooltip {
|
|
top: -100%;
|
|
opacity: 1;
|
|
color: white;
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
</style>
|
|
|