gpt4 book ai didi

javascript - Bootstrap 弹出窗口未显示在所有元素之上

转载 作者:IT王子 更新时间:2023-10-29 02:38:47 26 4
gpt4 key购买 nike

我在一个 bootstrap 网站上工作,在从 2.0 更新到 bootstrap 2.2 之后,除了弹出窗口之外,一切正常。

弹出窗口仍然显示正常,但它们没有显示在所有其他元素之上。

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

有人知道为什么弹出窗口的行为会改变,或者我该如何修复它?谢谢。

最佳答案

我能够通过在 html 元素上设置 data-container="body" 来解决问题

HTML 示例:

<a href="#" data-toggle="tooltip" data-container="body" title="first tooltip">
hover over me
</a>

JavaScript 示例:

$('your element').tooltip({ container: 'body' }) 

从此链接发现:https://github.com/twitter/bootstrap/issues/5889

关于javascript - Bootstrap 弹出窗口未显示在所有元素之上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14025438/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com