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