Home > Web Front-end > CSS Tutorial > How to Write Size-Specific Media Queries for iPhone 6 and 6 Plus?

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

Linda Hamilton
Release: 2024-12-06 05:48:14
Original
676 people have browsed it

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

Size-Specific Media Queries for iPhone 6 and 6 Plus

iPhone 6

  • Landscape:

    @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)
    { }
    Copy after login
  • 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)
    { }
    Copy after login

iPhone 6 Plus

  • Landscape:

    @media only screen 
        and (min-device-width : 414px) 
        and (max-device-width : 736px) 
        and (orientation : landscape) 
        and (-webkit-min-device-pixel-ratio : 3) 
    { }
    Copy after login
  • 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)
    { }
    Copy after login

Launch Images and Icons

iPhone 6

  • Launch images:

    • Portrait: 750 x 1334 (@2x)
    • Landscape: 1334 x 750 (@2x)
  • App icon: 120 x 120

iPhone 6 Plus

  • Launch images:

    • Portrait: 1242 x 2208 (@3x)
    • Landscape: 2208 x 1242 (@3x)
  • App icon: 180 x 180

General

  • Both:

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

The above is the detailed content of How to Write Size-Specific Media Queries for iPhone 6 and 6 Plus?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template