iphone - 响应式设计高达 320 像素?

标签 iphone responsive-design css

我不知道为什么我的响应式设计不适用于最大宽度为 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/

相关文章:

css - bootstrap 4 卡页脚显示不正确(使用 flex)

javascript - 为什么我的 angularJS 在我的示例网站上不起作用?

iphone - UIImageView的CALayer的anchorPoint "accessing unknown component of property"错误

html - 信封联系表响应问题

php - SEO 的重复 PHP 条件内容

css - 响应式背景图片

iphone - 在iphone程序中调用safari

iphone - 在 iPhone 上播放背景音频

iphone - 您是否创建了一家独资企业来在 Apple 的 App Store 上销售应用程序?

html - 水平居中堆叠图像