我在 div 中有一个 iframe,它看起来像:
<div align="center" style="z-index:0; -webkit-transform: translate3d(0,0,0); overflow-x:auto; -webkit-overflow-scrolling-x: touch">
<a href="c1" data="c1"></a>
<script type="text/javascript" src="iframe-loader"></script>
</div>
我希望输入表单可以在 x 轴上滚动,以便可以在手机上使用。这在台式机和其他手机(例如 Android)上工作正常,但在 iOS 中使用 Safari 时,滚动不存在或随机工作。
有什么可能的解决方法吗?这是 iOS 错误吗?
最佳答案
我在您的资源中看到您使用 Bootstrap ,所以为什么您不直接将 with 调整为全部在屏幕内而无需任何滚动(手机上的水平滚动对我来说并不是真正的用户友好)。
如果你真的想使用滚动,我推荐你使用:
-webkit-overflow-scrolling: touch;
代替
-webkit-overflow-scrolling-x: touch;
您是否尝试过使用 !important
?
关于html - 溢出-x : auto on iPhone is not scrolling,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27047474/