I use CSS3 to display a tooltip on hover:
.tooltip { position:absolute; visibility:hidden; } .f:hover .tooltip { visibility:visible; }
This is fine, but if a piece of text is large, it may seem a bit odd to point it in one place and show a tooltip in another. Is there a way, without using JavasScript (I know this is a cakewalk with JavaScript), so that the element appears near the mouse, where it first hung the text? Something like (conceptual example):
.f:hover:before .tooltip { top:mouse-y; right:mouse-x; }
source share