How to target iPhone 3GS AND iPhone 4 in one media query?

后端 未结 4 1942
天命终不由人
天命终不由人 2020-12-07 08:45

I am trying to implement alternate layouts for both the iPad/iPhone and older iPhones as well.

I have established that the best method is to use @media

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 08:59

    I'm not sure I follow your question. Did you try your queries on the iPhone 4? device-width is measured in logical pixels, not physical ones, so the iPhone 4 still fits the max-device-width: 480px criteria.

    Same goes for high-end Android smartphones, which have a pixel ratio of 1.5: the Nexus One has a physical screen of 480x800, logical screen of 320x533.

提交回复
热议问题