我正在使用 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/