如何更改jquery fancy box v2.1.4中弹出框的大小? [英] How to change size of popup box in jquery fancy box v2.1.4?

查看:88
本文介绍了如何更改jquery fancy box v2.1.4中弹出框的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jquery fancy-box v2.1.4(请参阅fancybox网站此处)。 Fancybox工作正常,但我无法改变弹出窗口的大小。如何控制fancybox弹出窗口的大小?

I am using jquery fancy-box v2.1.4 (see the fancybox website here). Fancybox is working fine, but I am having trouble changing the size of pop up window. How can I control the size of the fancybox popup window?

推荐答案

FancyBox as built in method to set width and height to the窗口生成以保存内容...检查网站的进一步说明,但这里有一个命中:

FancyBox as built in method to set width and height to the "window" generated to hold the content... check the website for further instructions, but here's a hit:

// initialize popup iframe (fancybox)
$(".yourframeclass").fancybox({
'autoDimensions': false,
'padding'       : 0,
'width'         : 940,
'height'        : 400,
'autoScale'     : false,
'transitionIn'  : 'none',
'transitionOut' : 'none',
 'type'          : 'iframe'
 });

这里我设置了一个固定的940px400px的弹出窗口(它也可以是%值) ...如果内容大于fancybox持有者,它会在同一个持有者上生成滚动条,而不是在文档本身上!

Here I'm setting a popup with fixed 940px by 400px (it can be % values as well)... and if the content is larger then the fancybox holder, it will generate scroll bars on that same holder and not on the document itself!!!

这篇关于如何更改jquery fancy box v2.1.4中弹出框的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆