fancybox的宽度和高度问题 [英] Width and height issue with fancybox

查看:123
本文介绍了fancybox的宽度和高度问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加此代码时,没有宽度和高度的设置

When I've added this code no setting on width and height works

jQuery(document).ready(function() {
  $('a.iframe').fancybox(); 
});

有哪些选项可以解决?

推荐答案

请参阅这里的文档: http://fancybox.net/api

您使用的是内置内容,因此请确保将autoDimensions选项设置为false以及宽度和高度设置。

You're using inline content, so make sure that you're setting the autoDimensions option to false along with the width and height settings.

UPDATE:我已成功测试以下解决方案:

UPDATE: I tested the following solution successfully:

    $('a.fbtag').fancybox({
        autoDimensions: false,
        height: 300,
        width: 400
    }); 

这假设你打开的链接的类名是'fbtag'。

This assumes that the class name of the link you're opening is 'fbtag'.

这篇关于fancybox的宽度和高度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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