我正在使用 tumblr 网站并向我的页面添加元素:http://gcseanswers.co.uk/chemistry
我嵌入了一个 iframe 以在页面上显示文档,它在桌面和 Android 设备上都能正常工作。但是,您无法在 iOS 上滚动 iframe。
这是html和css
iframe html
<div class="doc"><iframe src="https://docs.google.com/document/d/1FNsmMKZs-dGmO0Vy3V7AI25kswh6I2EW4UkD0q1EpYE/pub?embedded=true"></iframe></div>
CSS
.doc {
position: relative;
height: 500;
overflow: hidden;
padding-bottom: 85%;
}
.doc iframe {
position: absolute;
width: 100%;
height: 100%;
}
请你帮我解决这个问题,非常感谢。
最佳答案
尝试将此添加到您的父 iframe CSS 规则中。我相信这就是“.doc”。
overflow: auto
-webkit-overflow-scrolling:touch
关于html - iOS iframe 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37328109/