0

我有一个“li”项目,其中包含一个弹出引导工具提示的标签。

<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”之间强制换行?我不想使用 tooltip's(){html : true}选项来应对 XSS 攻击的风险。

4

1 回答 1

5

我发现,使用上面的半副本,体面的答案是将 CSS 设置为:

.tooltip-inner {
    white-space: pre-wrap;
    min-width: 100px;
}
于 2013-07-12T00:56:32.753 回答