gpt4 book ai didi

html - iFrame 和 Div ID 无法按预期用于 iOS iFrame 修复

转载 作者:行者123 更新时间:2023-11-27 23:30:18 25 4
gpt4 key购买 nike

iOS 会自动将可滚动 iFrame 的大小调整为 iFrame 内容的整个高度。

我已经在应用到 div 和 iFrame 的头部混合使用内联样式和样式来修复它,但是当尝试移动样式时,所有样式都移动到头部并将 ID 分配给 Div 和 iFrame,修复无效。

这个有效:

<html>
<head>
<style>
iframe {
height: 600px !important;
}
</style>
</head>
<body>
<div style="overflow: auto; -webkit-overflow-scrolling:touch;"><iframe src="//www.google.com/" width="100%" height="600px"></iframe></div>
</body>
</html>

这行不通:

<html>
<head>
<style>
#iOSiFrameFix {
height: 600px !important;
width: 100% !important;
}

#iOSDivFix {
overflow: auto !important;
-webkit-overflow-scrolling:touch !important;
}
</style>
</head>
<body>
<div id="iOSDivFix"><iframe id="iOSiFrameFix" src="//www.google.com/"></iframe></div>
</body>
</html>

我不确定我在这里做错了什么。由于某种原因,第二组代码没有应用修复。

最佳答案

两组代码均有效,失败的原因是我们的 CMS 中的发布设置配置错误。

关于html - iFrame 和 Div ID 无法按预期用于 iOS iFrame 修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57525736/

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