加入收藏 | 设为首页 | 会员中心 | 我要投稿 温州站长网 (https://www.0577zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

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

发布时间:2020-12-30 23:28:36 所属栏目:资源 来源:网络整理
导读:参见英文答案 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 an

参见英文答案 > 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/

(编辑:温州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读