ios iframe宽度跳回滚动



基本上我有一个来自非响应站点的iFrame,在容器div中,可以在移动设备上滚动。

 <div style="width: 100%; overflow: auto; overflow-y: auto; -webkit-overflow-   scrolling: touch; height: 7000px; position: relative;">
 <iframe style="background: transparent; height: 100%; width: 100%;" frameborder="0" src="https://myurl"></iframe>
 </div>

这对于iframe中的大多数页面都可以正常工作,但是在一个宽度较大的表格上,当您水平到达表末端时,水平滚动会跳回去。

不幸的是,出于安全原因,我无法提供链接

,如果使用溢出属性怎么办?

overflow: hidden

隐藏了全溢(如果正确使用)。您也可以使用

overflow-x: hidden
overflow-y: hidden

最新更新