Html 视口无法缩放到手机
我有一个使用 iweb 套件构建的网络应用程序,在 Android 和 iPhone 上看起来很棒。 唯一的问题是,在移动设备上,您可以抓住屏幕并将其向左移动一段距离,您看到的只是白色。如果我将其移至右侧,它不会执行此操作。 我有我的元标记集,例如 >
。
我还将 body 和 html css 标签设置为, margin: 0, padding: 0; width: 100%, height: 100%
我尝试通过 javascript 纠正应用程序在屏幕上的移动,但这是不行的。 以前有人遇到过这个吗?
I have a web app built with iweb kit that looks great in Android and iPhones.
The only issue is, when on a mobile, you can grab the screen and move it to the left for a good distance and all you see is white. It does not do this if I move it to the right.
I have my meta tag set such as this <meta content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" name="viewport" />
.
I also have the body and html css tags set to, margin: 0, padding: 0; width: 100%, height: 100%
I have tried to correct the movement of the app on the screen via javascript but it's a no go.
Has anyone ran into this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有没有定位固定的div?我设计的网站上的菜单遇到了这样的溢出问题。 Android 和 iPhone 似乎不像桌面浏览器那样处理固定定位。
如果可以避免的话,您可能也不想使用“user-scalable=no”,因为它会严重降低残疾人士的屏幕尺寸或字体大小之间的可用性。
Do you have any divs that are position:fixed? I had an overflow problem like this with a menu on a site I designed. Android and iPhone don't seem to handle fixed positioning the way desktop browsers do.
You also might not want to use "user-scalable=no" if you can avoid it because it can seriously cut down on usability between screen sizes or font sizes for people with disabilities.