bootstrap弹出窗口不会显示在所有元素之上 [英] bootstrap popover not showing on top of all elements

查看:90
本文介绍了bootstrap弹出窗口不会显示在所有元素之上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



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

 < div> //这个位于popover的顶部。这在清理脚本之前没有发生。 
< div> // popover显示在这个
< div>之上// popover在这个
//链接的顶部显示,其中带有弹出窗口。
< / div>
< / div>
< / div>

任何人都知道popover行为改变的原因,或者我可以如何修复它?感谢。

解决方案

我可以通过设置 data-container =body / code>


$ b

HTML 例如:

 < a href =#data-toggle =tooltipdata-container =bodytitle =first tooltip > 
悬停在我身上
< / a>

JavaScript

$ $ $ $'$元素'$''元素')。tooltip({container:'body'})
code>

从以下链接中找到: 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弹出窗口不会显示在所有元素之上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆