【发布时间】:2015-08-02 15:23:24
【问题描述】:
“X”媒体查询覆盖“Y”例如
/* ----------- iPhone 4 and 4S ----------- */
@media (min-width: 320px) and (max-width: 480px){
header{ height:480px; width: 100%; background-color: blue; }
h1:before {content: "iPhone 4";}
}
/* ----------- iPhone 5 and 5S ----------- */
@media (min-width: 320px) and (max-width: 568px){
header{ height:599px; width: 100%; background-color: blue; }
h1:before {content: "iPhone 5";}
}
我尝试添加设备纵横比来解决问题,但没有奏效。
有人知道答案吗?
未来如何在新设备上避免这种情况?
【问题讨论】:
标签: iphone media-queries