有没有办法让外部固定布局iframe子页面在移动设备上工作?

时间:2014-11-05 17:30:21

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

我正在运行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中加入了一些想法,但这似乎包含了第三方子页面的脚本,那么还有其他方法可以实现吗?#34;响应&#34; /在移动设备上工作?< / p>

1 个答案:

答案 0 :(得分:0)

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