我已将手机网站格式化,但在测试时,发现我的手机设备仍然是指普通格式的网页。
以下是我正在使用的代码:
<!-- SMARTPHONES, PORTRAIT & LANDSCAPE -->
<link rel="stylesheet" media="only screen and (min-width: 320px) and (max-width: 641px) and (orientation:portrait)" href="mobile.css" />
<link rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5)" href="mobile.css" />
<!-- NETBOOKS UP TO DESKTOPS -->
<link rel="stylesheet" media="only screen and (min-width: 641px) and (max-height: 750px)" href="netbook.css" />
<link rel="stylesheet" media="only screen and (min-width: 641px) and (min-height: 751px)" href="common.css" />
<link id="Link1" rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" /><link id="Link2" rel="icon" href="img/favicon.ico" type="image/ico" />
网站为http://www.interimspaces.co.uk
任何想法......
由于
答案 0 :(得分:1)
也许我错过了但我没有看到
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable = no">
在您网站的头部。