
2
Targeting iPhone 5 with Media Queries
Let's say I want to specifically target an iPhone 5 using media queries. I can do so based on the device's screen size like so:
@media only screen and (width:640px) {
...CSS rules here...
}
Is this the best way to do this or are there better expressions for specifically targeting the iPhone 5?
The 2 main ways to target for devices is A) device/screen width and B) device pixel ratio.
These resources do a great job of summarizing the various media queries available to target devices:
Stephen Gilbert Media Queries Guide
CSS-Tricks Media Queries for Standard Devices
CSS-Tricks Retina Display Media Query