html - 移动设备只能部分显示网页

标签 html ios css desktop display

非常抱歉打扰您,但我在 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/

相关文章:

javascript - html/JS 中其他输入的只读等价物

ios - Swift 3 - 如何防止实例化 View Controller 的背景消失在选项卡和导航栏后面?

ios - 在 UIViewController 中,Controller 应该配置它管理的 View ?

html - 如何正确渲染和动画 svg 图标?

css - 如何将显示 CSS 过渡延迟应用于子 div

javascript - 如何在 Angular 中使用通过状态传递的数据

javascript - 检查一组复选框是否在 Bootstrap 中选中。

javascript - 使用正则表达式在 img 标签的末尾插入 a/

ios - 内存在 iOS 模拟器中释放,但在设备 (ipad) 上未释放

jquery - 如何使用 jQuery 更改 ul 中事件链接的颜色?