2012-03-28 37 views
1

我使用的fancybox V2.0.5和無法弄清楚如何在上層慢慢褪色。 openSpeed參數僅控制內容淡入淡出速度,但我希望整個事物以這種速度消失。控制Fancybox2覆蓋淡入速度

這裏是我的電話:

$(".fancybox").fancybox({ 
    prevEffect : 'none', 
    nextEffect : 'none', 
    fitToView : false, 
    autoSize  : true, 
    openEffect  : 'fade', 
    openSpeed  : 1500, 
    helpers : { 
     overlay : { 
      opacity : 0.9, 
      css : { 
       'background-color' : '#fff' 
      } 
     } 
    } 
}); 

我在想,解僱之前加載的內容是關鍵的回調之一,但我似乎無法爲目標,從任何這些疊加。

任何幫助將不勝感激。

回答

3

您可以控制像

helpers: { 
    overlay: { 
    opacity : 0.9, 
    css : {'background-color' : '#fff'}, 
    speedIn: 1500, //<-- here you control the overlay speedIn 
    speedOut: 1500//<-- here you control the overlay speedOut 
    } // overlay 
    } // helpers 

EDIThelpers =>overlay選項(2012年9月12日)內:選項helpers =>overlay=>speedIn以來一直的fancybox V2.1除去。它仍然適用於v2.0.6及更低版本。

+0

是這就是我所需要的。謝謝! – fuzzyvagina 2012-03-29 11:35:03