2012-02-06 39 views
0

我剛剛更新到的fancybox 2,並已升級我以前定製的呼叫。的fancybox V2 - 的iFrame視頻自動縮放

以前,我有幾個VIMEO視頻中的iFrame顯示。視頻已經previosly縮放到寬度和高度我設置了以下這是偉大的現在

// 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? padding:0, margin:0 – cycaHuH 2012-02-06 20:44:05

回答

1

的fancybox V2.X選項不可用的fancybox v1.3.x選項兼容。你需要擺脫舊的選項,只留下v2.x的有效選項。現在

,該v.2.x的fancybox選項,你將需要以適應所要的大小設置(除了寬度,高度和類型= IFRAME)是

fitToView: false