在 Bootstrap 3 的工具提示中添加换行符 [英] Add line break to tooltip in Bootstrap 3

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

问题描述

我正在使用 Bootstrap 3 并在我的 div 中添加了一个工具提示.我试过使用 <br > 和 &#013;创建新行.Bootstrap 会阻止我吗?

I am using Bootstrap 3 and added a tooltip to my div. I've tried using < br > and &#013; to create the new line. Would it be a problem with the Bootstrap stopping me?

<div class="content show-tooltip" data-placement="top" 
     data-original-title="1st line of text <br> 2nd line of text">

推荐答案

您需要将 data-html="true" 添加到标记中..

You need to add data-html="true" to the markup..

<div class="content show-tooltip" data-html="true" data-placement="top" 
     title="1st line of text <br> 2nd line of text">

工作演示:http://www.bootply.com/83099

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

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