HTML A tag title formatting

こ雲淡風輕ζ 提交于 2019-12-10 13:07:41

问题


I was wondering if it is possible to display the title from an A tag reference, which comes up as a pop-up in your browser, if anyone know of any libraries to make this pop-up much nicer and have the ability to format the content?


回答1:


Use jQuery qTip.




回答2:


qTip is a powerful jQuery tooltip option which allows Images, Videos, Thumbnails, etc within the tooltip.




回答3:


You can't edit the tool tip itself, but you could use jQuery to create a div on the a:hover event, and style the div as you see fit.




回答4:


You can use the SimpleTip jQuery plugin for this.

There is more information over at this question on how to use this with the title attribute.

UPDATE

SimpleTip has now been superseeded by qTip




回答5:


As far as I know this is not possible. Not all browsers display a tooltip for anchor tags. I suggest using JavaScript for this behavior:

http://docs.jquery.com/Plugins/Tooltip




回答6:


There's no pure HTML way to do this. Some browsers don't even show the title attribute.

Your best option would be to use one of the numerous Javascript libraries.

For jQuery: 25 Useful jQuery Tooltip Plugins and Tutorials

For Prototype there aren't so many but Prototip is promising.




回答7:


i doubt that's possible... yet. Why not roll your own on a hover event using jQuery?




回答8:


By default title will be just a string, You can use any JS Plugins to make it look pretty. I guess you are not using any JS libraries as such, if using just javascript, here is a good one to work with DHTML javascript tooltip




回答9:


I did some playing and finally came up with using overLIB, see my blog for full details



来源:https://stackoverflow.com/questions/2049589/html-a-tag-title-formatting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!