gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 09:04:33 25 4
gpt4 key购买 nike

我正在开发一个运行 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 进行了一些思考,但它似乎包含用于第三方子页面的脚本,那么是否有任何其他方法可以使其“响应式”/在移动设备上工作?

最佳答案

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

关于javascript - 有没有办法让外部固定布局 iframe 子页面在移动设备上工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26763449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com