什么是创建HTML的最简单方法,鼠标悬停在工具提示上?

时间:2022-11-04 16:12:55

What is the easiest, cleanest way to create an HTML, mouse over tool tip without using tons of extra js references?

什么是最简单,最干净的方法来创建HTML,鼠标悬停工具提示而不使用大量额外的js引用?

<img id=Pennstate src="/blah" style="cursor:pointer;">

mouse over that and have a a nice tooltip "We are Pennstate!"

鼠标悬停在那上面并有一个很好的工具提示“我们是Pennstate!”

3 个解决方案

#1


45  

The easiest way is to use native HTML title attribute:

最简单的方法是使用本机HTML标题属性:

<img id=Pennstate src="/blah" style="cursor:pointer;" title="some text for tooltip">

But if you need more, try the jQuery tootip plugin.

但如果您需要更多,请尝试使用jQuery tootip插件。

#2


6  

If you don't care much what the tooltip looks like you can always just use the "title" attribute

如果你不太关心工具提示的样子,你总是可以使用“title”属性

#3


0  

have a look here for tooltip customization with CSS only http://sixrevisions.com/css/css-only-tooltips/

看看这里只用CSS工具提示自定义http://sixrevisions.com/css/css-only-tooltips/

the easiest way would be jquery though check out qtip2 http://craigsworks.com/projects/qtip2/

最简单的方法是jquery虽然看看qtip2 http://craigsworks.com/projects/qtip2/

#1


45  

The easiest way is to use native HTML title attribute:

最简单的方法是使用本机HTML标题属性:

<img id=Pennstate src="/blah" style="cursor:pointer;" title="some text for tooltip">

But if you need more, try the jQuery tootip plugin.

但如果您需要更多,请尝试使用jQuery tootip插件。

#2


6  

If you don't care much what the tooltip looks like you can always just use the "title" attribute

如果你不太关心工具提示的样子,你总是可以使用“title”属性

#3


0  

have a look here for tooltip customization with CSS only http://sixrevisions.com/css/css-only-tooltips/

看看这里只用CSS工具提示自定义http://sixrevisions.com/css/css-only-tooltips/

the easiest way would be jquery though check out qtip2 http://craigsworks.com/projects/qtip2/

最简单的方法是jquery虽然看看qtip2 http://craigsworks.com/projects/qtip2/