【问题标题】:Fancybox 3: position the iFrame in the top of the viewport?Fancybox 3:将 iFrame 定位在视口的顶部?
【发布时间】:2017-07-27 16:59:21
【问题描述】:

如何将 iFrame 定位在视口的顶部?向下 20 像素?

这是我的 Fancybox 代码:

$("[data-fancybox]").fancybox({
  iframe : {
    preload: false
  },
  .....
});

【问题讨论】:

    标签: fancybox fancybox-2 fancybox-3


    【解决方案1】:

    内容(图片除外)仅使用 CSS 居中,因此应该是这样的:

    .fancybox-slide--iframe .fancybox-content {
        vertical-align: top;
        margin: 20px;
    }
    

    【讨论】:

    • 谢谢! margin: 20px 应该是 margin: 20px !important。否则,它将不起作用。
    猜你喜欢
    • 2019-07-14
    • 2011-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多