在工具提示中添加换行符 [英] Add line break within tooltips

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

问题描述

如何在HTML工具提示中添加换行符?



我尝试使用< br /> \\\
,如下所示:

 < a href =#title =一些长文本< br />第二行文本\第三行文本>悬停我< / a> 

然而,这没用,我可以看到文字< br /> \\\
在工具提示中。任何建议都会对您有所帮助。

c $ c>用于标题属性中的换行符。


How can line breaks be added within a HTML tooltip?

I tried using <br/> and \n within the tooltip as follows:

<a href="#" title="Some long text <br/> Second line text \n Third line text">Hover me</a>

However, this was useless and I could see the literal text <br/> and \n within the tooltip. Any suggestions will be helpful.

解决方案

Just use the entity code &#013; for a linebreak in a title attribute.

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

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