mercredi 4 mars 2015

Media Queries - Target iPhone 6/ 6 Plus without older iPhones

I am able to target the iPhone 6/ 6 Plus with Media Queries.



/* iPhone 6 */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) {}

/* iPhone 6 Plus */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) {}


Problem:


It targets all other iPhones (iPhone 6 style - the landscape orientation for older iPhones exceeds 375px).


Is there any way around this or will I have to use JavaScript?


I would also like to target other phones like a Samsung Galaxy S4 (360px).


Cheers.




Aucun commentaire:

Enregistrer un commentaire