-
-
Save rodi01/1709630 to your computer and use it in GitHub Desktop.
CSS Tooltip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tooltip { position: relative; } | |
.tooltip span { | |
position: absolute; | |
right: 0; | |
top: -35px; | |
display: none; | |
min-width: 50px; | |
padding: 3px 8px; | |
white-space: nowrap; | |
font-size: 11px; | |
text-align: center; | |
background-color: rgba(0,0,0,.8); | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
} | |
.tooltip span small { | |
position: absolute; | |
right: 10px; | |
bottom: -6px; | |
border-top: 6px solid rgba(0,0,0,.8); | |
border-left: 6px solid transparent; | |
} | |
.tooltip:hover span { display: block; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="tooltip" href="#"> | |
My Link <span>Cool Tooltip<small></small></span> | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tooltip span { background-color: #000; } | |
.tooltip span small { border-top: 6px solid #000; } | |
/* IE 6 Tooltip Arrow Fix */ | |
*html .tooltip span small { | |
border-left: 6px solid #363636; /* Match the color of the background */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment