Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我想区分 iPhone 4 和 iPhone 5,我需要使用哪些媒体查询?(我也需要区分垂直和水平)
更新:有人向我询问了iPhone 5,但我正在寻找 4 种不同的,它们只会影响 iPhone 和完全相同尺寸的手机。
由于屏幕较长,iPhone 5 的最大设备宽度不同。
@media only screen and (min-device-width: 640px) and (max-device-width: 1136px) and (-webkit-min-device-pixel-ratio: 2) { /* iPhone 5 specific stuff */ }