prevents older browsers that do not support media queries with media features from applying the given styles -->
/* CSS media query within a stylesheet */ @media all and (min-width:500px) { … } @media (orientation: portrait) { … } @media not (all and (monochrome)) { ... }
Слайд 10
Device specific breakpoints /* Smartphones (portrait and landscape) */ @media
only screen and (min-device-width : 320px) and (max-device-width :
480px) { /* Styles */ }
/* Samsung Galaxy S5 */ @media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){ /* Styles */ } @media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){ /* Styles */ }
/* iPhone 6 */ @media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){ /* Styles */ } @media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){ /* Styles */ }
Слайд 11
Device specific breakpoints /* iPads (portrait and landscape) */ @media
only screen and (min-device-width : 768px) and (max-device-width :
1024px) { /* Styles */ } /* iPads (landscape) */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { /* Styles */ }
/* iPads (portrait) */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { /* Styles */ }
/* Desktops and laptops */ @media only screen and (min-width : 1024px) { /* Styles */ }
/* Large screens */ @media only screen and (min-width : 1824px) { /* Styles */ }