Force One Line Break in Bootstrap Tooltip [duplicate]

冷暖自知 提交于 2019-12-08 10:41:59

问题


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.


回答1:


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

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


来源:https://stackoverflow.com/questions/17605450/force-one-line-break-in-bootstrap-tooltip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!