“Écran médiatique CSS” Réponses codées

Écran médiatique CSS

@media (max-width: 991px){
    .mobile{
        display: block;
    }
}
Apollo

Orientation CSS MAX et Min Width Media Query

<style type="text/css">
    /* default styles here for older browsers. 
       I tend to go for a 600px - 960px width max but using percentages
    */
    @media only screen and (min-width: 960px) {
        /* styles for browsers larger than 960px; */
    }
    @media only screen and (min-width: 1440px) {
        /* styles for browsers larger than 1440px; */
    }
    @media only screen and (min-width: 2000px) {
        /* for sumo sized (mac) screens */
    }
    @media only screen and (max-device-width: 480px) {
       /* styles for mobile browsers smaller than 480px; (iPhone) */
    }
    @media only screen and (device-width: 768px) {
       /* default iPad screens */
    }
    /* different techniques for iPad screening */
    @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
      /* For portrait layouts only */
    }

    @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
      /* For landscape layouts only */
    }
</style>
Grumpy Gentoo

CSS @Media

body {
background-color: white;}

@media (max-width: 1600px) { body {
background-color: red;
      }
 }

@media (max-width: 1200px) { body {
background-color: blue;
      }
 }

@media (max-width: 1000px) { body {
background-color: cyan;
      }
 }


@media (max-width: 640px) { body {
background-color: green;
      }
 }
Hilarious Hummingbird

Réponses similaires à “Écran médiatique CSS”

Questions similaires à “Écran médiatique CSS”

Plus de réponses similaires à “Écran médiatique CSS” dans CSS

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code