解决:mui 的 选项卡 + 下拉刷新 功能,在其中嵌入 iframe 后,在 iphone 的情况下,iframe 的内容不能滚动,只显示第一屏内容。

我所遇到的情况是,使用 mui 的 选项卡 + 下拉刷新 功能时,其中有2个页面是嵌入了别的网站的页面,而别个几个是通过 ajax 加载本网站的数据。然后 在其中嵌入 iframe 后,在 iphone 的情况下,iframe 的页面内容不能滚动,只显示第一屏内容。

<div class="mui-scroll-wrapper" style="-webkit-overflow-scrolling: touch;overflow-y: scroll;"><!--数字-->
    <iframe src="http://******"></iframe>
</div>

解决问题是添加了 :

style="-webkit-overflow-scrolling: touch;overflow-y: scroll;"


我所遇到的问题通过在 iframe 的 父盒子添加 上面的样式,已经解决问题了。

猜你喜欢

转载自www.cnblogs.com/JaneBlog/p/9009178.html
今日推荐