iframe 滚动 iOS 8 [英] Iframe scrolling iOS 8
本文介绍了iframe 滚动 iOS 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 iframe,我需要它来滚动溢出.它似乎在桌面上工作,我使用了一种解决方法使其在 iOS 中工作.它现在适用于 android 和 iOS.然而,iOS8 却失败了.
<身体><style type="text/css">.滚动容器{溢出:滚动;-webkit-overflow-scrolling:触摸;}#iframe_survey {高度:100%;}.滚动容器{高度:100%;宽度:100%;溢出:滚动;}</风格><div class="scroll-container scroll-ios"><iframe id="iframe_survey" src="www.iframe.com" style="border:0px #FFFFFF none;"name="myiFrame" frameborder="0" marginheight="0px" marginwidth="0px" width="100%"></iframe>
解决方案
代码这样使用
<iframe style="width:100%;height:600px" src="www.iframe.com"></iframe>
I have an iframe and i need it to have a scrolling overflow. it seems work out in desktop, i used a work around to make it work in iOS. it works on android and iOS now. however, iOS8 it fails.
<html>
<body>
<style type="text/css">
.scroll-container {
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
#iframe_survey {
height: 100%;
}
.scroll-container {
height: 100%;
width: 100%;
overflow: scroll;
}
</style>
<div class="scroll-container scroll-ios">
<iframe id="iframe_survey" src="www.iframe.com" style="border:0px #FFFFFF none;" name="myiFrame" frameborder="0" marginheight="0px" marginwidth="0px" width="100%"></iframe>
</div>
</body>
解决方案
Use the code in this way
<div style="overflow:auto;-webkit-overflow-scrolling:touch">
<iframe style="width:100%;height:600px" src="www.iframe.com"></iframe>
</div>
这篇关于iframe 滚动 iOS 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文