Created
April 6, 2021 15:17
-
-
Save jgarciaruiz/aa7c323e1a796c327d7310d44e12a9ee to your computer and use it in GitHub Desktop.
All iPhone CSS media queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* iphone 3 */ | |
@media only screen and (min-device-width: 320px) and (max-device-height: 480px) and (-webkit-device-pixel-ratio: 1) { | |
// whatever | |
} | |
/* iphone 4 */ | |
@media only screen and (min-device-width: 320px) and (max-device-height: 480px) and (-webkit-device-pixel-ratio: 2) { | |
// whatever | |
} | |
/* iphone 5 */ | |
@media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-device-pixel-ratio: 2) { | |
// whatever | |
} | |
/* iphone 6, 6s, 7, 8 */ | |
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (-webkit-device-pixel-ratio: 2) { | |
// whatever | |
} | |
/* iphone 6+, 6s+, 7+, 8+ */ | |
@media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (-webkit-device-pixel-ratio: 3) { | |
// whatever | |
} | |
/* iphone X , XS, 11 Pro, 12 Mini */ | |
@media only screen and (min-device-width: 375px) and (max-device-height: 812px) and (-webkit-device-pixel-ratio: 3) { | |
// whatever | |
} | |
/* iphone 12, 12 Pro */ | |
@media only screen and (min-device-width: 390px) and (max-device-height: 844px) and (-webkit-device-pixel-ratio: 3) { | |
// whatever | |
} | |
/* iphone XR, 11 */ | |
@media only screen and (min-device-width : 414px) and (max-device-height : 896px) and (-webkit-device-pixel-ratio : 2) { | |
// whatever | |
} | |
/* iphone XS Max, 11 Pro Max */ | |
@media only screen and (min-device-width : 414px) and (max-device-height : 896px) and (-webkit-device-pixel-ratio : 3) { | |
// whatever | |
} | |
/* iphone 12 Pro Max */ | |
@media only screen and (min-device-width : 428px) and (max-device-height : 926px) and (-webkit-device-pixel-ratio : 3) { | |
// whatever | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment