在引导工具提示中强制一行中断 [英] Force One Line Break in Bootstrap Tooltip

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

问题描述

 < label class = radio dropClick centTooltipdata-toggle =tooltipdata-placement =righttitle =这里有一些词将显示在工具提示中> 
< input type =radioclass =centTooltipname =centsid =optionsRadios2value =AA>
悬停工具提示!
< / label>

如何在'that'和'will'之间强制换行?我不想使用工具提示的() {html:true} 选项来承担XSS攻击的风险。

解决方案

不错的答案我发现,使用上述的半重复,将CSS设置为:

  .tooltip-inner {
white-space:pre-wrap;
min-width:100px;
}


I have a 'li' item that contains a label which pops up a Bootstrap tooltip.

<label class="radio dropClick centTooltip" data-toggle="tooltip" data-placement="right" title="Here are some words that will show up in the tooltip">
    <input type="radio" class="centTooltip" name="cents" id="optionsRadios2" value="AA">
    Hover for ToolTip! 
</label>

How do I force one line break between 'that' and 'will'? I don't want to use the tooltip's() {html : true} option for risk of XSS attacks.

解决方案

Decent answer I found, using the semi-duplicate above, is to set the CSS as:

.tooltip-inner {
    white-space: pre-wrap;
    min-width: 100px;
}

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

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