0

当有人像工具提示一样将鼠标悬停在按钮上时,我基本上会出现一个框。但我希望能够将 html 放入框中。我已经能够使用 div 和一些 javascript 来隐藏和取消隐藏 div,但我似乎无法让 div 在鼠标悬停在按钮上时出现在鼠标所在的位置。有没有办法做到这一点?

4

1 回答 1

1

You could get help using a library like jquery.

Or you can try with something like:

http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/

Here is a working demo:

http://sandbox.scriptiny.com/tooltip/

You need to replace the logic to work with your button, but it should be easy.

于 2012-11-15T21:10:46.420 回答