使用CSS增加宽度
你可以使用CSS来增加你的popover的宽度,像这样:
/* The max width is dependant on the container (more info below) */
.popover{
max-width: 100%; /* Max Width of the popover (depending on the container!) */
}
如果这不工作,你可能想要下面的解决方案,并改变你的容器元素。 (View the JSFiddle)
Twitter bootstrap容器
如果这不工作,你可能需要指定容器:
// Contain the popover within the body NOT the element it was called in.
$('[data-toggle="popover"]').popover({
container: 'body'
});
更多信息
popover包含在被触发的元素内。为了扩展它“全宽” – 指定容器:
// Contain the popover within the body NOT the element it was called in.
$('[data-toggle="popover"]').popover({
container: 'body'
});
JSFiddle
查看JSFiddle试试看。