【问题标题】:Fancybox V2 - iFrame video autoscaleFancybox V2 - iFrame 视频自动缩放
【发布时间】:2012-02-06 19:29:29
【问题描述】:

我刚刚更新到 Fancybox 2,并且一直在升级我以前的自定义调用。

以前,我在 iFrame 中显示了一些 vimeo 视频。视频之前已经缩放到我设置的宽度和高度,这很棒

// Vimeo popups from the homepage etc 
// Fetches a static html page where the iframe is embedded
    $('a.vimeo-pop').fancybox({
    'width'             : 707,
    'height'            : 384,
        'autoScale'         : false,
        'transitionIn'      : 'none',
    'overlayColor'      : '#000',
    'overlayOpacity'    : 0.9,
    'transitionOut'     : 'none',
    'allowfullscreen'   : 'true'    
    });

现在我使用的是 V2,我不得不调整一些东西,视频不再缩放到我设置的宽度和高度。我看到滚动条等

下面是我的新电话

   // NEW FANCYBOX V2  
   // Vimeo popups from the homepage etc  
   // Fetches a static html page where the iframe is embedded
    $("a.vimeo-popV2").fancybox({       
       'width'              : 707, 
       'height'             : 384,
       'autoScale'              : false,
        'transitionIn'      : 'none', 
        'overlayColor'      : '#000', 
        'overlayOpacity'    : 0.9, 
        'transitionOut'     : 'none', 
        'type'              : 'iframe', 
        'autoSize'      : false, 
        'allowfullscreen'   : 'true'
    });

有什么想法吗? 谢谢

【问题讨论】:

  • 您是否尝试将边距或内边距设置为 0?填充:0,边距:0

标签: jquery iframe fancybox vimeo


【解决方案1】:

Fancybox v2.x 选项与 fancybox v1.3.x 选项不兼容。您需要摆脱旧选项,只保留 v2.x 的有效选项。

现在,您需要设置的 v.2.x fancybox 选项(除了宽度、高度和 type=iframe)以匹配您想要的大小

fitToView: false

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-11
    • 2015-09-20
    • 2014-05-26
    • 2018-08-05
    • 2011-07-06
    • 1970-01-01
    • 2014-01-18
    相关资源
    最近更新 更多