简体   繁体   English

如何在iPhone上禁用水平滚动

[英]How to disable horizontal scrolling on iphone

I have a web app written in html5 with css3 that works find on iPad and android. 我有一个用css3用html5编写的网络应用程序,可以在iPad和android上找到它。 Problem is, on iPhones, the whole page seems be scrolled sideways when I pull it. 问题是,在iPhone上,当我拉动它时,整个页面似乎都在横向滚动。 (Only happens on iPhones). (仅发生在iPhone上)。 it's not a scroll bar problem , since horizonly - the body element is 100% the screen width. 这不是滚动条问题 ,因为在水平方向上-主体元素是屏幕宽度的100%。 so overflow is not the way to go here. 所以溢出不是要走的路。 could any one help please? 有人可以帮忙吗?

this might help,add these metas to your code : 这可能会有所帮助,将这些metas添加到您的代码中:

<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="minimum-scale=1.0, width=device-width, maximum-scale=1, user-scalable=no" name="viewport" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM