我的fancybox模式的高度超过了页面的高度。我知道我可以在模态中添加一个滚动条,但这不是我要找的解决方案。是否可以使用页面滚动条滚动模态,以便我可以看到模态的隐藏部分?
答案 0 :(得分:0)
您的目标内容包含维度(width
和height
),或者您将width
和height
设置为fancybox API选项。
无论如何,请将fitToView
设为false
A)。内容尺寸
$(".fancybox").fancybox({
fitToView: false
});
B)。在fancybox中设置尺寸
$(".fancybox").fancybox({
fitToView: false,
width: 350, // or whatever
height: 1000 // height longer than the viewport
});
参见 JSFIDDLE