在Bootstrap工具提示中强制一行换行

时间:2013-07-11 23:51:50

标签: html css twitter-bootstrap tooltip line-breaks

我有一个'li'项目,其中包含一个弹出Bootstrap工具提示的标签。

<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>

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

1 个答案:

答案 0 :(得分:4)

我发现使用上面的半复制品的体面答案是将CSS设置为:

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