Fancybox全宽

joe*_*mmo 7 css jquery vimeo fancybox vimeo-api

我是编码的新手,我试图让我的主页上的每个fancybox只有全宽和响应(例如)但这些选项中没有完成这项工作(fitToView,autoSize或aspectRatio).

jQuery的

jQuery(document).ready(function() {
jQuery( "#site-logo" ).click(function( e ) {
    alert( "As you can see, the link no longer took you to jquery.com" );
    jQuery.scrollTo( 0 , 1000, { easing:'easeInOutExpo' });
$(".fancybox").fancybox({
    helpers : {
        media: true 
        },
        width: 1600,
        height: 870,
        aspectRatio: true,
        scrolling: no,
        });
    });
});
Run Code Online (Sandbox Code Playgroud)

Dim*_*nte 6

尝试添加autoSize false,删除aspectRatio并将宽度更改为"100%":

jQuery(document).ready(function() {
    jQuery( "#site-logo" ).click(function( e ) {
    alert( "As you can see, the link no longer took you to jquery.com" );
    jQuery.scrollTo( 0 , 1000, { easing:'easeInOutExpo' });
    $(".fancybox").fancybox({
        helpers : {
            media: true 
        },
        width: "100%",
        height: 870,
        autoSize: false,
        scrolling: false
        });
    });
});
Run Code Online (Sandbox Code Playgroud)