【问题标题】:Is there a way to make external fixed layout iframe child page to work on mobile?有没有办法让外部固定布局 iframe 子页面在移动设备上工作?
【发布时间】:2015-01-02 00:19:58
【问题描述】:

我正在开发一个运行 Drupal 的移动网站。

目标是将第三方日历软件嵌入到页面中。我试图嵌入的日历恰好是固定宽度的。

下面的 css 使 iframe 和其中的任何响应式内容都能很好地工作,但我靠墙的地方是固定宽度的子页面。

.embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16/9 ratio */
    padding-top: 30px; /* IE6 workaround*/
    height: 0;
    overflow: hidden;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

我对 responsiveiframe.js 进行了一些思考,但这似乎包含第三方子页面的脚本,那么还有其他方法可以使其“响应”/在移动设备上工作吗?

【问题讨论】:

    标签: javascript css iframe responsive-design drupal-7


    【解决方案1】:

    要获得确切答案,我需要有关元素的更多信息。 但试试这个width:100% !important; 覆盖:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-15
      • 1970-01-01
      • 2015-04-02
      • 1970-01-01
      • 2019-05-27
      • 1970-01-01
      • 2019-09-26
      相关资源
      最近更新 更多