在title属性中添加换行符 [英] Adding a line break in the title attribute

查看:708
本文介绍了在title属性中添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解如何在标题属性中添加一个中断,我希望在title属性中有中断来区分名称。
如何在标题属性中添加中断?



我有这样的内容

 < p title =这是对某些文字< br>和进一步说明的描述>一些文字< / p> 

显示的是:

新行,你想要换行符,它适用于一些浏览器,但不是全部。



示例:

  div {background-color:#c3c3c3;显示:块;宽度:100px; height:100px; }  

< div title =This is a Text Second第三行!>内容< / div>

JSFiddle :

http://jsfiddle.net/g5CGh/


i would like to find out how to add a break in the title attribute, i would like to have breaks in the title attribute to differentiate the names. how can i add a break in the title attribute?

i have something like this

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

what comes out is:

解决方案

If you add a new line where you want line breaks, it works on SOME browsers, but not all.

Example:

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/

这篇关于在title属性中添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆