在 iPad/iPhone 上的纵向和横向之间切换时,响应站点会被放大 [英] Responsive site is zoomed in when flipping between Portrait and Landscape on iPad/iPhone

查看:21
本文介绍了在 iPad/iPhone 上的纵向和横向之间切换时,响应站点会被放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里使用 Twitter Bootstrap 构建了一个响应式网站:http://zarin.me/cce/

I've built a responsive site using Twitter Bootstrap here: http://zarin.me/cce/

响应式设计在 iPad 和 iPhone 上效果很好,但是当我将设备从纵向翻转到横向时,网站被放大而不是适应屏幕(捏合屏幕有效).

The responsive design works great on iPad and iPhone, however when I flip the device from portrait to landscape, the site is zoomed in instead of adapting to the screen (pinching the screen works).

我错过了什么?这是视口问题吗?这是我的唯一视口代码:

What am I missing? Is this a viewport issue? Here's the only viewport code I have in my :

<meta content="width=device-width, initial-scale=1.0" name="viewport">

提前致谢!

推荐答案

您还想添加最大比例

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

更新我同意一些评论,声明不应限制用户的缩放,因为这是不好的做法.下面是一个更好的方法,我相信缩放错误早就被 Apple 修复了.

UPDATED I agree with some of the comments, the declaration should not limit the scaling by the user as this is bad practice. The below is a better approach and I believe that the zooming bug has long since been fixed by Apple.

<meta name="viewport" content="width=device-width, initial-scale=1">

这篇关于在 iPad/iPhone 上的纵向和横向之间切换时,响应站点会被放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆