在iPad/iPhone的纵向和横向之间切换时,响应站点会放大 [英] Responsive site is zoomed in when flipping between Portrait and Landscape on 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屋!