在IOS中,引导模式下的iframe无法滚动 [英] In IOS, iframe in a bootstrap modal can not scroll
本文介绍了在IOS中,引导模式下的iframe无法滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在引导程序模态主体中有一个iframe:
I have an iframe inside a bootstrap modal body:
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<iframe style="height:500px;"> </iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
当我尝试在此处向下滚动iframe时,IOS中没有任何反应. (iphone和ipad)相反,它在Android中完美运行.
When I try to scroll down the iframe here, nothing happens in IOS. (iphone and ipad) Conversely, it perfectly works in Android.
我应该做出哪些调整才能在IOS中解决此问题?
What adjustments should I make to fix this in IOS?
推荐答案
尝试在iOS的modal-body
上使用-webkit-overflow-scrolling: touch;
.这似乎是一个常见问题.
Try using -webkit-overflow-scrolling: touch;
on modal-body
for iOS. It seems to be a common issue.
编辑 OP指出此帮助他们找到了他们的解决方案.
EDIT OP states that this helped them find their solution.
这篇关于在IOS中,引导模式下的iframe无法滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文