我正在使用fancybox 1.2.1打开iframe。我的问题是我的宽度,高度和滚动选项实际上没有做任何事情。我错过了什么吗?它只是以默认大小打开。
接下来的电话:
$(document).ready(function(){
$('a[rel=gallery]').fancybox({
'width':920,
'height':700,
'scrolling':'no'
});
});
然后是页面中的链接:
<a class="iframe" href="http://www.myiframedomain.com/page.jsp" rel="gallery">
<img src="/img/content/button.png" width="210" height="115" alt="" />
</a>
感谢。
答案 0 :(得分:2)
您没有使用正确的选项名称。版本1.3+中定义了width
和height
。
对于1.2.1,请改用frameWidth
和frameHeight
。查看所有选项的here(并注意1.2.1中没有scrolling
)。
你发布的内容在1.3.1中完全正常但没有变化,所以我建议你升级,如果可以的话。