Well, you got me thinking...you can't really style the <abbr> tag. So I tweaked it a little and this one works and looks much better.
Change the macro to:
\define def(word)
<a href="#" class="def" data-tooltip={{Definitions##$word$}}>$word$</abbr>
\end
Now create a new tiddler with the tag $:/tags/Stylesheet that looks like this:
.def {
position:relative;
text-decoration: none;
border-bottom: 1px dotted #555;
color: #000;
}
.def a:hover {
position:relative;
}
a[data-tooltip]:hover:after {
content: attr(data-tooltip);
font-size: 75%;
padding: 4px 8px;
width: 200px;
overflow: auto;
color: #333;
position: absolute;
left: 0;
top: 200%;
white-space: normal;
z-index:999;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc));
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
}
I just grabbed this off the internet from kevin11189 (
https://css-tricks.com/forums/topic/can-we-style-the-abbr-title-through-css/). I tweaked it a little and it isn't ideal but it works for an example.
Make the tiddler type text/css and save it.
Now when you use the macro you will get a nice tooltip with the definition under the mouse pointer. You can change the location and look be tweaking the CSS. IT works with Chrome and Firefox. I haven't tried it with anything else.