自 iOS4 以来,存在无法滚动 iFrame 的错误:
index.html
<html>
<body>
<iframe style="height:100px;border: 1px solid blue" src="iframe.html"></iframe>
</body>
</html>
iframe.html
<html>
<body>
<div style="height:200px"></div>
</body>
</html>
您会注意到 height:100px
样式会被 iOS 忽略。
是否有针对此行为的官方故障单?
在 iOS10 中是否可以滚动 iframe 的内容?
最佳答案
试试这个:
<div style="overflow:auto;-webkit-overflow-scrolling:touch">
<iframe style="height:100px;border: 1px solid blue" src="iframe.html"></iframe>
</div>
关于html - iOS 可滚动 iFrame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42061971/