kazzkiq / balloon.css
- воскресенье, 13 марта 2016 г. в 16:08:18
CSS
Simple tooltips made of pure CSS
Balloon.css lets you add tooltips to elements without JavaScript and in just a few lines of CSS.
For positioning, use data-balloon-pos
attribute with one of the values: up
, down
, left
or right
:
<button data-balloon="Whats up!" data-balloon-pos="up">Hover me!</button>
<button data-balloon="Whats up!" data-balloon-pos="left">Hover me!</button>
<button data-balloon="Whats up!" data-balloon-pos="right">Hover me!</button>
<button data-balloon="Whats up!" data-balloon-pos="down">Hover me!</button>
You can also add any HTML special character to your tooltips, or even use third-party Icon fonts:
<button data-balloon="HTML special characters: ☻ ✂ ♜" data-balloon-pos="up">Hover me!</button>
<button data-balloon="Emojis: 😀 😬 😁 😂 😃 😄 😅 😆" data-balloon-pos="up">Hover me!</button>
Example using Font Awesome:
<button class="fa" data-balloon="Font Awesome:     " data-balloon-pos="up">Hover me!</button>
Made by Claudio Holanda (@kazzkiq)