Conflict between Bootstrap tabbable and popover

我只是一个虾纸丫 提交于 2019-12-06 02:33:42

The tab content div has the css property overflow set to auto (by Bootstrap). This means that when the size of the content exceeds the size of the div, the browser adds a scrollbar and clips the content. You can overwrite the property to its default (visible) in one of your own css files, or just by using inline styles like this:

<div class="tab-content" style="overflow: visible;">

Example: http://jsfiddle.net/grc4/BXmC3/

Use the "container" option. This way you can append the popover/tip to the body element where it will not get chopped off by the tabs pane overflow:hidden...example:

<script>
$(function(){
   $('a[rel=popover]').popover({
   trigger: 'hover',
   placement: 'in bottom',
   animate: true,
   delay: 500,
   container: 'body'
   });
});  
</script>

or:

 <a rel="popover" data-container="body">Pop Me Open</a>

Your tooltip will still be placed correctly next to your link, but since its now attached to the body tag, its not going to be "half-hidden" by the tab pane.

see the docs for tooltip/popover on the bootstrap site...

2.3.2:

http://getbootstrap.com/2.3.2/javascript.html#popovers

or 3.0

http://getbootstrap.com/javascript/#popovers

Instead of $ use jQuery It may resolve your conflicts. I think you have to increase the height of the tab content like this

.tab-content
{
    height:400px;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!