iOS忽略元视口宽度=设备宽度,初始比例= 1.0

yit*_*ail 5 safari viewport ios

当我在iphone中使用Safari查看以下html文件时,它不会显示内容的整个宽度,因为它应该:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>iOS Viewport Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style type="text/css">
body #wrap {
    width: 1008px;
    border: 1px solid #000;
}
h1 {
    font:30px sans-serif;   
}
</style>
</head>

<body>
<div id="wrap">
<h1>Here's some quite eloooongated text that should make the screen at least 1008px wide or more</h1>
</div><!-- end #wrap -->
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

谁能看到我做错了什么?对于它的价值,我有iOS 6.1和Safari 6.0

yit*_*ail 8

虽然我非常仔细地阅读了苹果的各种观点指南,但显然我误解了.如果某个网站没有响应,就像我的一样,在这种情况下,正确的元数据是

<meta name="viewport" content="width=1008"/>
Run Code Online (Sandbox Code Playgroud)

这使得视口适合纵向和横向的内容.这里有一个关于这种方法的讨论:http://webdesignerwall.com/tutorials/viewport-meta-tag-for-non-responsive-design