mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-27 20:50:21 +08:00
60 lines
No EOL
1.1 KiB
HTML
60 lines
No EOL
1.1 KiB
HTML
<div class="tooltip">
|
|
<div class="icon">i</div>
|
|
<div class="tooltiptext">This is a cool tooltip!</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by SmookyDev - Tags: simple, neumorphism, skeuomorphism, flashy, tooltip, icon, hover effect, css */
|
|
.tooltip {
|
|
position: relative;
|
|
display: inline-block;
|
|
cursor: pointer;
|
|
font-family: "Arial", sans-serif;
|
|
}
|
|
|
|
.tooltip:hover .tooltiptext {
|
|
visibility: visible;
|
|
opacity: 1;
|
|
}
|
|
|
|
.tooltiptext {
|
|
visibility: hidden;
|
|
width: 200px;
|
|
background-color: #333;
|
|
color: #fff;
|
|
text-align: center;
|
|
border-radius: 5px;
|
|
padding: 10px;
|
|
position: absolute;
|
|
z-index: 1;
|
|
top: 125%;
|
|
left: 50%;
|
|
margin-left: -100px;
|
|
opacity: 0;
|
|
transition: opacity 0.3s;
|
|
}
|
|
|
|
.tooltiptext::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: -10px;
|
|
left: 50%;
|
|
margin-left: -10px;
|
|
border-width: 10px;
|
|
border-style: solid;
|
|
border-color: transparent transparent #333 transparent;
|
|
}
|
|
|
|
.tooltip .icon {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: #4caf50;
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
text-align: center;
|
|
line-height: 20px;
|
|
}
|
|
|
|
</style>
|
|
|