【问题标题】:cant set fancybox iframe from javascript无法从javascript设置fancybox iframe
【发布时间】:2018-07-15 12:34:59
【问题描述】:

我正在尝试像这样在 javascrip 中设置和调用 fancybox

$.fancybox.open({
        type : 'iframe',
        'width'             : '75%',
        'height'            : '75%',
        'autoScale'         : false,
        'transitionIn'      : 'none',
        'transitionOut'     : 'none',
        src : url,
        smallBtn : false,
        fitToView: false,
        autoSize: false,
        autoDimensions: false
  })

它打开它很好但没有定义尺寸,我做错了什么? o 我需要设置其他东西吗?它只是加载一个显示地图的页面,谢谢

【问题讨论】:

    标签: javascript fancybox-3


    【解决方案1】:

    使用 CSS 或 iframe.css 选项:

        iframe : {
            css : {
                width  : '75%',
                height : '75%'
            }
        }
    

    请参阅文档 - https://fancyapps.com/fancybox/3/docs/#iframe - 了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多