mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
52 lines
No EOL
1,015 B
HTML
52 lines
No EOL
1,015 B
HTML
<div class="tooltip-container">
|
|
<span class="tooltip">Hello</span>
|
|
<span class="text">Let me Pop up</span>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by Cksunandh - Tags: simple, tooltip, button, color, btn, html, css, simple button */
|
|
.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;
|
|
}
|
|
|
|
</style>
|
|
|