我不知道为什么我的响应式设计不适用于最大宽度为 320 像素的尺寸。我在 Chrome 中尝试不同尺寸的 iPad 并且工作正常但 iPhone 出错了。我的代码如下:
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<link rel="stylesheet" type="text/css" href="css/iPhonePortrait.css" media="only screen and (max-width : 320px) and (orientation : portrait)" />
<link rel="stylesheet" type="text/css" href="css/iPadLandscape.css" media="only screen and (max-width : 1024px) and (orientation : landscape)" />
<link rel="stylesheet" type="text/css" href="css/iPadPortrait.css" media="only screen and (max-width : 768px) and (orientation : portrait)" />
浏览器更新了,有什么想法吗?
最佳答案
您需要这个作为您的元标记 <meta name="viewport" content="width=device-width,initial-scale=1.0">
.
关于iphone - 响应式设计高达 320 像素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17165720/