我正在使用响应式设计,该设计在模拟器(http://iphone5csimulator.com/)中可完美运行。但是在iphone5s上,设计坏了。我使用的是@media (max-width: 320px) {}
之类的CSS样式。还有其他方法可以使其完美吗?是否有其他模拟器可供测试?
在模拟器中
在iPhone中
最佳答案
/* iPhone 5 Retina regardless of IOS version */
@media (device-height : 568px)
and (device-width : 320px)
and (-webkit-min-device-pixel-ratio: 2)
/* and (orientation : todo: you can add orientation or delete this comment)*/ {
/*IPhone 5 only CSS here*/
}
或尝试使用@media屏幕
@media screen and (device-aspect-ratio: 40/71) {
}
查看浏览器堆栈,他们有很多移动模拟器。.-Link
关于css - 响应式设计不适用于iPhone 5s,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25861023/