2

我将 Bootstrap 2.2 弹出框与 FullCalendar 结合使用,但是当它们出现在边缘附近时,它们会被日历的 CSS 剪裁 - 请参阅此处的小提琴:http: //jsfiddle.net/nzxyY/6/

日历有几个包含内容的 div,但我怀疑这是罪魁祸首:

.fc-view {
   width: 100%;
   overflow: hidden;
 }

我可以使用 CSS hack 来使弹出框避免溢出:FullCalendar 对其内容施加的隐藏约束吗?将弹出框绑定到内部日历 DOM 元素(例如滚动)是有好处的,但它目前有被剪裁的缺点。我尝试将上述规则更改为溢出:可见,但这不起作用。感谢您对此的任何想法。

4

2 回答 2

5

还有其他问题可以通过相同的解决方案来解决,但是每次的上下文都有很大的不同:

确定的解决方案是升级到最新的 2.3.0 版本,或者将此差异(github)应用到您的 jQuery 工具提示插件(因为 popover 继承了工具提示行为)。

然后您可以使所有弹出框的行为相同(主要是因为您将弹出框初始化委托给另一个框架):

$.fn.popover.defaults.container = 'body';

检查固定的小提琴


或者您可以通过 popover 使用选项 popover :

$('.popover').popover({
    container: 'body'
});
于 2013-02-10T17:57:40.520 回答
0

overflow: hidden您可以使用 clearfix代替使用。Bootstrap已经包含一个(作为 LESS 混合)。

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}
于 2013-02-10T16:35:17.820 回答