Fancybox无法在Google Chrome浏览器中滚动 [英] Fancybox does not scroll in Google Chrome

查看:91
本文介绍了Fancybox无法在Google Chrome浏览器中滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.mayakaimal.com/media-press

它可以在我测试过的所有其他浏览器中使用.

It works in all other browsers I have tested.

<script type="text/javascript">
        $j = jQuery.noConflict();
        $j(function(){
        $j("a.fancybox").fancybox({
            maxWidth    : '100%',
            maxHeight   : '100%',
            fitToView   : false,                   
            closeClick  : false,
            openEffect  : 'none',
            closeEffect : 'none'
        });   
        });
    </script>

推荐答案

如果指定的fancybox高度大于某个值,则fancybox将不会滚动.不知道为什么会这样.

If the specified fancybox height is more than a certain value, the fancybox will not scroll. Not sure why that is the case.

以下代码在我的情况下有效.试一试,看看它是否可以解决您的问题.

The below code worked in my case. Play with it to see if it can fix your case.

    height: Math.min(600, $(window).height() - 96)

    $.fancybox({
        width: 800,
        height: Math.min(600, $(window).height() - 96),
        autoScale: false,
        padding: 8,
        href: url,
        scrolling: 'auto',
        hideOnOverlayClick: false,
        centerOnScroll: true,
        transitionIn: 'elastic',
        transitionOut: 'elastic',
        type: 'iframe'
    });

这篇关于Fancybox无法在Google Chrome浏览器中滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆