Fancybox全宽

时间:2015-01-21 19:22:13

标签: jquery css fancybox vimeo vimeo-api

我对编码很陌生,我试图让每个fancybox只在homepage全宽和响应(eg),但是这些选项中没有完成这项工作(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,
        });
    });
});

1 个答案:

答案 0 :(得分: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
        });
    });
});