mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
64 lines
No EOL
1.7 KiB
HTML
64 lines
No EOL
1.7 KiB
HTML
<div class="tooltip-container">
|
|
<span class="tooltip">Uiverse.io</span>
|
|
<span class="text">Tooltip</span>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by piolho123 - Tags: simple, tooltip, pink */
|
|
/* This is an example, feel free to delete this code */
|
|
.tooltip-container {
|
|
border-radius: 20px;
|
|
--background: #f1f;
|
|
position: relative;
|
|
background: var(--background);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
font-size: 17px;
|
|
padding: 0.7em 1.8em;
|
|
box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
|
|
rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset,
|
|
rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px,
|
|
rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px,
|
|
rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
|
|
}
|
|
|
|
.tooltip {
|
|
border: 1px solid #f1f;
|
|
border-radius: 20px;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 10%;
|
|
transform: translateX(-50%);
|
|
padding: 0.3em 0.6em;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: all 0.3s;
|
|
background: transparente;
|
|
color: #f1f;
|
|
box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
|
|
rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset,
|
|
rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px,
|
|
rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px,
|
|
rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
|
|
}
|
|
|
|
.tooltip::before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 0.6em;
|
|
width: 0.6em;
|
|
bottom: -0.2em;
|
|
left: 50%;
|
|
transform: translate(-50%) rotate(45deg);
|
|
background: var(--background);
|
|
}
|
|
|
|
.tooltip-container:hover .tooltip {
|
|
top: -100%;
|
|
opacity: 1;
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
</style>
|
|
|