Web Tooltip “universally accepted” linebreak character?

前端 未结 4 1860
面向向阳花
面向向阳花 2020-12-19 08:26

I use \\n to create a linebreak in web tooltip. This works in IE and in Chrome. But Firefox ignores it.

What will work universally as linebreak character in tooltip?

4条回答
  •  半阙折子戏
    2020-12-19 09:31

    As of Firefox 12 they now support line breaks using the line feed HTML entity:

    Test
    

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

提交回复
热议问题