How Do High-DPI Devices Like Retina Displays And 1080p Phones Handle Pixels In Media Queries?
For example, how many pixels does the iPhone with a Retina display appear to a media query? Is it 320 pixels or 640 pixels? If it's 640 pixels, how can a website deal with differen
Solution 1:
Retina devices like the iPhone and iPad usually use 2 device pixels = 1 CSS pixel. So a media query like this:
@media all and (max-width: 320px) {
}
actually will target an iPhone (portrait), even though it is 640 device pixels wide.
Post a Comment for "How Do High-DPI Devices Like Retina Displays And 1080p Phones Handle Pixels In Media Queries?"