A tooltip library in CSS
Note: CSS3 Transitions on pseudo elements is currently available on Firefox only. On rest of the browsers it degrades gracefully without any transition. Though the good news is that it will be coming soon on webkit also.
###Try it out: http://kushagragour.in/lab/hint/
Download one of the 2 library version:
- [unminified] : https://raw.github.com/chinchang/hint.css/master/hint.css
- [minified] : https://raw.github.com/chinchang/hint.css/master/hint.min.css
And include it in the HEAD of your page:
<link rel="stylesheet" href="hint.css"></link>
<link rel="stylesheet" href="hint.min.css"></link>
Any element in your markup which needs to have a tooltip has to be given atleast 2 classes:
hint & any one of
hint--right to position the tooltip.
Hello Sir, <span class="hint hint--bottom">hover me.</span>
The tooltip text needs to be given using the
data-hint attribute on that element.
Hello Sir, <span class="hint hint--bottom" data-hint="Thank you!">hover me.</span>
Use it with other available modifiers in various combinations. Available modifiers:
Check out some examples at http://kushagragour.in/lab/hint/
hint.css is developed in SASS and the source files can be found in the
If you would like to create more types of tooltips/ fix bugs/ enhance the library etc. you are more than welcome to submit your pull requests.
Copyright (c) 2013 Kushagra Gour Licensed under the MIT license.