Maison >interface Web >tutoriel CSS >Comment écrire des requêtes multimédias spécifiques à la taille pour iPhone 6 et 6 Plus ?

Comment écrire des requêtes multimédias spécifiques à la taille pour iPhone 6 et 6 Plus ?

Linda Hamilton
Linda Hamiltonoriginal
2024-12-06 05:48:14687parcourir

How to Write Size-Specific Media Queries for iPhone 6 and 6 Plus?

Requêtes multimédias spécifiques à la taille pour iPhone 6 et 6 Plus

iPhone 6

  • Paysage :

    @media only screen 
        and (min-device-width : 375px) // or 213.4375em or 3in or 9cm
        and (max-device-width : 667px) // or 41.6875em
        and (width : 667px) // or 41.6875em
        and (height : 375px) // or 23.4375em
        and (orientation : landscape) 
        and (color : 8)
        and (device-aspect-ratio : 375/667)
        and (aspect-ratio : 667/375)
        and (device-pixel-ratio : 2)
        and (-webkit-min-device-pixel-ratio : 2)
    { }
  • Portrait :

    @media only screen 
        and (min-device-width : 375px) // or 213.4375em
        and (max-device-width : 667px) // or 41.6875em
        and (width : 375px) // or 23.4375em
        and (height : 559px) // or 34.9375em
        and (orientation : portrait) 
        and (color : 8)
        and (device-aspect-ratio : 375/667)
        and (aspect-ratio : 375/559)
        and (device-pixel-ratio : 2)
        and (-webkit-min-device-pixel-ratio : 2)
    { }

iPhone 6 Plus

  • Paysage :

    @media only screen 
        and (min-device-width : 414px) 
        and (max-device-width : 736px) 
        and (orientation : landscape) 
        and (-webkit-min-device-pixel-ratio : 3) 
    { }
  • Portrait :

    @media only screen 
        and (min-device-width : 414px) 
        and (max-device-width : 736px)
        and (device-width : 414px)
        and (device-height : 736px)
        and (orientation : portrait)
        and (-webkit-min-device-pixel-ratio : 3) 
        and (-webkit-device-pixel-ratio : 3)
    { }

Lancer les images et Icônes

iPhone 6

  • Images de lancement :

    • Portrait : 750 x 1334 (@2x )
    • Paysage : 1334 x 750 (@2x)
  • Icône de l'application : 120 x 120

iPhone 6 Plus

  • Images de lancement :

    • Portrait : 1242 x 2208 (@3x)
    • Paysage : 2208 x 1242 (@3x)
  • Icône de l'application : 180 x 180

Général

  • Les deux :

    @media only screen 
        and (max-device-width: 640px), 
        only screen and (max-device-width: 667px), 
        only screen and (max-width: 480px)
    { }

Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn