Bootstrap - Popover被模态标题切断

Tom*_*ken 7 css twitter-bootstrap

我在Bootstrap 2.3.1中的模态窗口中使用弹出窗口.问题是popover显示在modal-header div下面.

你可以在这里看到这个问题的一个例子/小提琴:("Launch Demo Modal",然后"Click to toggle popover") http://jsfiddle.net/cZ6Cr/2/

相关代码是:

<a class="btn" data-content="And here's some amazing content.  It's very engaging.     right? And another thing about this is a that it's really long.  When I say long I mean really, really long." 
rel="popover" 
href="#"
data-original-title="A Title">
Click to toggle popover
</a>
Run Code Online (Sandbox Code Playgroud)

*我在GitHub上修改了cvrebert从这个帖子创建的小提琴 https://github.com/twbs/bootstrap/issues/5014

Kyl*_*Mit 15

根据工具提示大小动态调整模态容器的大小,证明有点棘手.
但是,您可以通过添加来从HTML流中提取工具提示position: fixed.

CSS:

.popover {
    z-index: 9999;
    position: fixed;
}
Run Code Online (Sandbox Code Playgroud)

在jsFiddle现场演示

看起来像这样:

演示


Tom*_*ken 5

通过使用以下方式修复: .modal-body{overflow-y:visible;}

要么

.modal-body{overflow:visible;}
Run Code Online (Sandbox Code Playgroud)

小提琴:http : //jsfiddle.net/cZ6Cr/4/