Created
December 12, 2012 11:35
-
-
Save kevinsimper/4267126 to your computer and use it in GitHub Desktop.
Tooltip CSS
A CSS3 snippet, which uses the Before and Hover statements.
This file contains hidden or 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
/* Wrap around a div about what you will in a tooltip and it will hide the content and show only a symbol */ | |
.tooltip:before { | |
content: url(/media/icon16_tooltip.png); | |
margin-top: 18px; | |
} | |
.tooltip:hover:before { | |
content: ''; | |
} | |
.tooltip { | |
vertical-align: top; | |
color: white; | |
height: 16px; | |
overflow: hidden; | |
width: 16px; | |
background: white; | |
position: absolute; | |
} | |
.tooltip:hover { | |
border: 1px solid #ADADAD; | |
border-radius: 3px; | |
z-index: 100; | |
margin: -5px 0 0 -5px; | |
padding: 5px; | |
box-shadow: 0px 2px 0px 0px #CCC; | |
color: black !important; | |
height: auto !important; | |
width: auto !important; | |
overflow: visible !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment