2012-01-06 81 views
4

我试图让Fancybox停止调整图库中的图像大小。我有一些需要滚动的更大的图像。这是我目前的fancybox的jQuery:Fancybox 2 - 在图库中停止调整大小

$('.gallery').fancybox({ 
      padding: 0, 
      scrolling: 'yes', 

      openEffect : 'elastic', 
      openSpeed : 150, 

      prevEffect : 'fade', 
      nextEffect : 'none', 
      closeEffect : 'elastic', 
      closeSpeed : 100, 

      closeBtn : false, 
      arrows : true, 
      nextClick : true, 

      helpers : { 
       thumbs : { 
        width : 50, 
        height : 50 
       }, 
       overlay : { 
        opacity : 0.8 
       } 
      } 
     }); 

回答

4

设置fitToViewfalse这样:

$('.gallery').fancybox({ 

      fitToView: false, // add this 

      padding: 0, 
      scrolling: 'yes', 

      openEffect : 'elastic', 
      openSpeed : 150, 

      prevEffect : 'fade', 
      nextEffect : 'none', 
      closeEffect : 'elastic', 
      closeSpeed : 100, 

      closeBtn : false, 
      arrows : true, 
      nextClick : true, 

      helpers : { 
       thumbs : { 
        width : 50, 
        height : 50 
       }, 
       overlay : { 
        opacity : 0.8 
       } 
      } 
     }); 
+0

不适合我;打破画廊 – 2012-03-23 02:31:41

+0

很可能你忘了添加试用逗号来分隔这个选项,或者你可能在引号或其他任何引发js错误的语法问题中包含'false'布尔值。 – JFK 2012-03-23 03:05:53

+0

感谢愚蠢的错误! – 2012-03-24 20:36:17

0

AUTOSCALE财产对我的作品。

$('.gallery').fancybox({ 
    'autoScale':false, 
});