html – 在title属性中添加换行符

参见英文答案 > How can I use a carriage return in a HTML tooltip?24个
我想知道如何在title属性添加一个中断,我想在title属性中有中断来区分名称.
如何在title属性添加中断?

我有类似的东西

<p title="this is a description of the some text <br> and further description">Some Text</p>

出来的是:

解决方法

如果您在想要换行的地方添加新行,则它适用于某些浏览器,但不适用于所有浏览器.

例:

div { background-color: #c3c3c3; display: block; width: 100px; height: 100px; }
<div title="This is a text
    Second line
    Third line!">Contents</div>

的jsfiddle
http://jsfiddle.net/g5CGh/

相关文章

Mip是什么意思以及作用有哪些
怎么测试Mip页面运行情况
MIP安装的具体步骤有哪些
HTML添加超链接、锚点的方法及作用详解(附视频)
MIP的规则有哪些
Mip轮播图组件中的重要属性讲解