javascript - Fancybox 溢出被隐藏

标签 javascript jquery html css fancybox-2

我正在使用 fancybox 2 并将 html 内容附加到模态。我关闭了滚动,现在溢出模态的内容被隐藏了。这是模态最大高度的问题吗?我该如何解决这个问题?

我的代码:

$('.fancybox-open').fancybox({
    openEffect  : 'none',
    closeEffect : 'none',
    'scrolling'   : 'no',
    'closeBtn' : true,
    afterLoad   : function() {
        this.content.html();
    }
});

最佳答案

您有多种可能的原因导致此问题发生。

我们需要更多信息以获得明确的答案,但这里有一些可能的原因。

尝试其中的一些参数:

$('.fancybox-open').fancybox({
    openEffect  : 'none',
    closeEffect : 'none',
    'scrolling'   : 'no',

    'height' : 1000,           <--- Try these one at a time
    'autoHeight' : true,       <--- Try these one at a time
    'autoResize' : true,       <--- Try these one at a time
    'fitToView' : true,        <--- Try these one at a time

    'closeBtn' : true,
    afterLoad   : function() {
        this.content.html();
    }
});

您可以阅读此处记录的完整插件选项:

关于javascript - Fancybox 溢出被隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21420056/

相关文章:

javascript window.location id

JavaScript游戏——无法跨越的物体

javascript - HandsOnTable - 从 0.11.0 升级到 0.15.0-beta 2 后销毁并重新创建不起作用

javascript - onchange 选择选项不起作用

html - 其他目录中带有 noscript 的样式表

Javascript:隐藏表格行

JQuery 滑动效果不起作用?

html - 可滚动容器内的表格仍然导致容器宽度增加

css - 删除将文本叠加到 img 时留下的空白区域,(html,css)

javascript - 即使 Promise 没有实现,Promise 也会执行