非常抱歉打扰您,但我在 Google 上找不到此搜索查询的任何答案。
所以让我快速解释一下我的问题。 我创建了一个在纵向和横向模式之间切换的网页。
当我使用桌面时一切正常,页面显示正确。当我在我的 iPhone 5 上启动我的网页时,它做了一些“奇怪”的事情: 它仅部分显示页面。如果我想看到整个页面,我需要缩小,这对用户来说非常烦人。
所以如果你们知道如何解决这个问题,请告诉我!
非常感谢您帮助我!
编辑:
我正在使用 <meta name="viewport" content="width=device-width, initial-scale=1.0">
标签
为了优化移动设备的 css,我使用了媒体查询
@media screen and (orientation:portrait) {...}
回答:
This is the cause of my issue: Reset zoom level onload. Sadly, it's not yet possible to fix this problem... This is the case because I have a login form on a previous page that links to a new page whenever I log in. With IOS your browser automatically zooms in at the input, which when the new page is loaded, still is the zoom level...
最佳答案
使用 <meta name="viewport" content="width=300">
应该使您的网页自动缩小几乎所有移动设备。但请确保您的网站针对移动设备进行了优化,否则您的所有文本都会变得很小,人们会希望他们再次放大。
关于html - 移动设备只能部分显示网页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45906293/