bootstrap popover 没有显示在所有元素的顶部 [英] bootstrap popover not showing on top of all elements
问题描述
我正在一个引导程序站点上工作,从 2.0 更新到引导程序 2.2 后,除了弹出窗口之外,一切正常.
popovers 仍然可以正常显示,但它们不会出现在所有其他元素之上.
//这位于弹出框的顶部.这在清理脚本之前没有发生.<div>//popover 显示在此之上<div>//popover 显示在此之上//链接到这里,里面有弹出框.
任何人都知道为什么弹出窗口的行为会发生变化,或者我该如何解决?谢谢.
我能够通过在 html 元素上设置 data-container="body"
来解决问题
HTML
示例:
悬停在我身上</a>
JavaScript
示例:
$('你的元素').tooltip({ container: 'body' })
从此链接发现:https://github.com/twitter/bootstrap/issues/5889
I'm working on a bootstrap site and after updating to bootstrap 2.2 from 2.0 everything worked except the popover.
The popovers still show up fine, but they don't show up on top of all other elements.
<div> // this sits on top of the popover. this did not happen before cleaning up scripts.
<div> //popover shows on top of this
<div> //popover shows on top of this
//link here with popover in it.
</div>
</div>
</div>
Anyone have any idea on why the behavior of the popover changed, or how I can fix it? Thanks.
I was able to solve the problem by setting data-container="body"
on the html element
HTML
example:
<a href="#" data-toggle="tooltip" data-container="body" title="first tooltip">
hover over me
</a>
JavaScript
example:
$('your element').tooltip({ container: 'body' })
Discovered from this link: https://github.com/twitter/bootstrap/issues/5889
这篇关于bootstrap popover 没有显示在所有元素的顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!