How to Apply CSS Media Queries for different mobile devices (Html 5 App)
Media Queries
"The Media Queries consists of a media type and zero or more expressions that check for the conditions of particular media features."Features like :
- Browser window (width and height ).
- Device screen size (width and height) & Resolution.
- Orientation (landscape or portrait mode).
- Resolution.
iPhone ://iPad 1, iPad 2, iPad Mini
- @media only screen and (min-width: 768px) and (-webkit-device-pixel-ratio: 1)
//iPad 3, iPad 4
- @media only screen and (min-width: 768px) and (-webkit-device-pixel-ratio: 2)
//iPhone 3G
- @media only screen and (min-width: 320px) and (-webkit-device-pixel-ratio: 1)
//iPhone 4
- @media only screen and (device-width: 320px) and (-webkit-device-pixel-ratio: 2)
//iPhone 5
- @media only screen and (min-width: 320px) and (min-height: 568px) and (-webkit-device-pixel-ratio: 2)
//iPhone 6
- @media only screen and (min-width: 375px) and (min-height: 667px) and (-webkit-device-pixel-ratio: 2)
//iPhone 6 Plus
- @media only screen and (min-width: 414px) and (min-width: 736px) and (-webkit-device-pixel-ratio: 3)
Android ://HTC One, Samsung Galaxy S5, OnePlus One
- @media only screen and (min-width: 360px) and (-webkit-device-pixel-ratio: 3)
//Samsung Galaxy S2
- @media screen and (min-width: 320px) and (-webkit-device-pixel-ratio: 1.5)
//Samsung Galaxy S3
- @media only screen and (min-width: 320px) and (-webkit-device-pixel-ratio: 2)
//Samsung Galaxy S4
- @media only screen and (min-width: 320px) and (-webkit-device-pixel-ratio: 3)
//LG Nexus 4
- @media screen and (min-width: 384px) and (-webkit-device-pixel-ratio: 2)
//LG Nexus 5, Huawei Ascend P7
- @media only screen and (min-width: 360px) and (-webkit-device-pixel-ratio: 3)
//Asus Nexus 7
- @media only screen and (min-width: 601px) and (-webkit-min-device-pixel-
ratio: 1.331) and (-webkit-max-device-pixel- ratio: 1.332) and more other devicesDesktop Browser :
- @media only screen and (min-width:1025px)
- @media only screen and(min-width:1281px)
and more ...