iphone - 媒体查询不适用于(最小宽度 :321px)

标签 iphone css

我正在构建响应式设计,一切都很好,除了我似乎无法针对 iPhone 3g 用户。

我添加了以下媒体查询,但第一个 (max-width:320px) 似乎不起作用

@media screen and (max-width: 320px) {
// STYLES GO HERE
}

@media screen and (min-width: 321px) and (max-width: 640px) {
//STYLES GO HERE
}

我做错了什么吗?

最佳答案

试试最大设备宽度 (max-device-width: 320px);我没有专门针对非 Retina 显示屏 iPhone 尝试过它,但发现它在专门针对 iPhone 4 时很有用。

关于iphone - 媒体查询不适用于(最小宽度 :321px),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8152397/

相关文章:

iphone - 返回 'self',但在我的自定义分配方法中未将其设置为 '[(super or self) init...]' 的结果

iphone - 要编程的 iPhone 一次拍摄 2 张​​照片的速度有多快?

iphone - 在代码或数据库中传播删除?

html - 如何处理具有垂直节奏的响应式图像?

iphone - 应用内的评分和评论会将用户带到应用商店,从而离开我们的应用 - 完全不受欢迎

iphone - 数据源中的 KVO 问题

jquery - CSS Left 和 Top 在 chrome、firefox 和 IE 中的行为不同

html - CSS/PHP 链接样式

jquery - 显示 : none on container element breaks jquery absolute positioning calculation childrens child elements

html - CSS:标签/输入不会在 IE7 中 float