开发者

Web Tooltip "universally accepted" linebreak character?

I use \n to create a linebreak in web tooltip. This works in IE and in Chrome. But Firefox ignores i开发者_StackOverflow社区t.

What will work universally as linebreak character in tooltip? Thanks.


Update: This has been cleared up in HTML5 using the title attribute. Now Firefox 12 supports it. Try this:

<span title="First line&#10;Second line">Test</span>

Bad news: Firefox does not line break tooltips. This is actually a non-standard html extension, ie a bug in MSIE that may cause problem with certain pages.

See this bug on the firefox issue tracker.


As of Firefox 12 they now support line breaks using the line feed HTML entity: &#10;

<span title="First line&#10;Second line">Test</span>

This works in IE and is correct according to the HTML5 spec for the title attribute.


Firefox doesn't display multi-lines in tooltips.

Use tooltip script if you really want to customize it as you expected. http://www.hongkiat.com/blog/tooltips-scripts-50-scripts-with-ajax-javascripts-css-tutorials/


This works in mail messages %0A See these google results for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜