我正在玩視口,試圖做寬度爲520,但它似乎做設備寬度。有任何想法嗎?視口忽略自定義寬度
<html>
<head>
<meta name="viewport" content="width=520, initial-scale=1, maximum-scale=1, user-scalable=no">
<style type="text/css">
h1
{
width: 980px;
border: 1px solid red;
}
h2
{
width: 520px;
border: 1px solid green;
}
h3
{
width: 320px;
border: 1px solid green;
}
</style>
</head>
<body>
<h1>I am a big heading 980px wide. Yes I am</h1>
<h2>I am a big heading 520px wide. Yes I am</h2>
<h3>I am a big heading 320 wide. Yes I am</h3>
</body>
您是否閱讀過[這篇偉大的文章](http://www.quirksmode.org/mobile/viewports2.html)解釋像素對移動視口意味着什麼? –
有沒有特別的理由讓你不要設置「DOCTYPE」? –