Fancybox——我不想要滚动条。

时间:2023-01-25 20:05:17

I'm using Fancybox v2.1.5 to load html content. The content will be loaded into a CMS by the client so I need the height of the iframe to be dynamic. The problem I'm running across is that no matter what options I change I can't seem to get it to cap the content at a certain height and apply a scrollbar.

我使用Fancybox v2.1.5来加载html内容。内容将被客户端加载到CMS中,所以我需要iframe的高度是动态的。我遇到的问题是,无论我改变什么选项,我都无法让它在一定的高度限制内容,并应用滚动条。

The client would like the iframe to extend beyond the bottom of the viewport so you would have to scroll the entire page to read the whole article. I'm getting a little stuck.

客户端希望iframe扩展到viewport的底部,这样您就必须滚动整个页面来读取整篇文章。我有点卡住了。

$('.fancybox').fancybox({
        maxWidth: 800,
        width: '70%',
        fitToView: false,
        autoSize: false,
        scrolling: 'no', 
        height: 'auto',
        closeClick: false,
        padding: 0,
        beforeShow: function () {
            $('.fancybox-inner').css({
                'border-radius': '10px',
                'padding-top': '15px',
                'background-color': '#e7e7e7'
            });
        }
    });

1 个解决方案

#1


0  

.fancybox {
    max-height: ___px;
    overflow-y: visible;
}

Something like this in your CSS?

你的CSS里有类似的东西吗?

#1


0  

.fancybox {
    max-height: ___px;
    overflow-y: visible;
}

Something like this in your CSS?

你的CSS里有类似的东西吗?