Fancybox包装器无法正确调整图像尺寸 [英] Fancybox wrapper not auto-sizing correctly to image dimensions
本文介绍了Fancybox包装器无法正确调整图像尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在FancyBox上遇到问题.应该根据图像的尺寸自动调整包装器的大小.它不是那样做的.具体来说,它太小了.
I'm having an issue with FancyBox. It's supposed to auto-resize the wrapper in accordance to the dimensions of the image. It's not doing that. Specifically it's too small.
这是我使用的FancyBox jQuery代码:
Here's the FancyBox jQuery code I've used:
$("a[rel=photo_gallery]").fancybox({
'type' : 'image',
'padding' : 10,
'autoScale' : true,
'cyclic' : true,
'overlayOpacity' : 0.7,
'overlayColor' : '#000000',
'transitionIn' : 'fade',
'transitionOut' : 'fade',
'titlePosition' : 'over',
'titleShow' : false,
'resize' : 'Auto'
});
还有其他人遇到过这个问题吗?
Has anyone else ever run into this issue?
在此先感谢您的帮助.
推荐答案
以上对我不起作用(FB 3beta).
Above did not work for me (FB 3beta).
这是我的解决方案:
.fancybox-wrap, .fancybox-wrap *{
-moz-box-sizing: content-box !important;
-webkit-box-sizing: content-box !important;
-safari-box-sizing: content-box !important;
box-sizing: content-box !important;
}
这篇关于Fancybox包装器无法正确调整图像尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文