jQuery - Fancybox: But I don't want scrollbars!

前端 未结 24 2063
醉话见心
醉话见心 2020-12-15 17:37

I am using jQuery Fancybox for a popup registration form here

I would like the form to come up at the size of 450px by 700px but no matter what I set the height and

24条回答
  •  北荒
    北荒 (楼主)
    2020-12-15 17:54

    I have face the same problem and after times of trial and error, I found out that you can avoid scrollbars by overriding frame css class.

    You can do like this:

    iframe.fancybox-iframe {
        overflow:hidden;
    }
    

    JS configuration:

    jQuery(document).ready(function(){
        $("a.various").fancybox({
            'width'             : 'auto',
            'height'            : 'auto',
            'autoScale'         : false,
            'autoDimensions'    : false,
            'scrolling'         : 'no',
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'type'              : 'iframe'  
        }); 
    });
    

    Note: Your fancybox box type must be an iframe for this to take effect.

提交回复
热议问题