kazzkiq / balloon.css

Simple tooltips made of pure CSS
https://kazzkiq.github.io/balloon.css/
MIT License
5.03k stars 448 forks source link

Using other HTML elements than "button"? #98

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello,

I recently found the project and the main documentation at:

https://kazzkiq.github.io/balloon.css/

There is one thing I'd like to see added there.

I tested with "" tag and it seems to work too, so I wonder if we can use it on any tag.

kazzkiq commented 6 years ago

Yes, you can use balloon on any HTML element, as far as this element accepts :before and :after pseudo elements.

The reason why <button> is used in examples is simply because its meant for user mouse/touch interaction, so it makes more semantic sense to use them as examples instead of <div> or other block elements. But it could really be any other element.