【问题标题】:Fancybox 3: how to show the small close button for modal iframe?Fancybox 3:如何显示模态 iframe 的小关闭按钮?
【发布时间】:2017-07-28 06:31:31
【问题描述】:

我正在使用 Fancybox 3 来显示模态 iframe。这是我初始化 Fancybox 的代码:

    modal: true,
    smallBtn: true,
    iframe: {
        css: {
            width : '900px',
            height: '600px'
        },
        preload: false 
    }

如果我删除modal: true,我可以看到小按钮。但是,如果我设置modal: true,则不会显示小按钮。

【问题讨论】:

标签: fancybox fancybox-2 fancybox-3


【解决方案1】:

来自关于modal 选项的文档:

// Shortcut to make content "modal" - disable keyboard navigtion, hide buttons, etc
modal : false

因此,如果将其设置为true,则不会按预期显示任何按钮。

一些演示小关闭按钮的演示 - https://codepen.io/anon/pen/jaVyYV?editors=1010

【讨论】:

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