调整Fancybox iframe重叠式广告的宽度和高度时出现问题 [英] Problem adjusting Fancybox iframe overlay width and height

查看:60
本文介绍了调整Fancybox iframe重叠式广告的宽度和高度时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Fancybox创建带有iframe的叠加层,一切正常,但是我似乎无法更改width/height的值.我正在使用fancybox-1.2.6和jquery1.2.6

I'm using Fancybox to create an overlay with an iframe everything works but I can't seem to change the values of the width/height. I'm using fancybox-1.2.6 and jquery1.2.6

$(document).ready(function() {

        $("a.iframe").fancybox({
     'width' : '75%',
     'height' : '75%',
     'autoScale' : false,
     'transitionIn' : 'none',
     'transitionOut' : 'none',
     'type' : 'iframe'
});
    });

<a class="iframe" id="iframe" title="Sample title" href="http://google.com/">iframe</a>

推荐答案

以下是在固定大小的花式框中手动打开iframe的方法

Here's how to manually open an iframe in a fixed sized fancybox

$.fancybox.open({
  'href': 'mypage.html',
  'type': 'iframe',
  'autoSize': false,
  'width': 800,
  'height': 800
}); 

这篇关于调整Fancybox iframe重叠式广告的宽度和高度时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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