CSS Android和Iphone - 现代css媒体查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CSS Android和Iphone - 现代css媒体查询相关的知识,希望对你有一定的参考价值。

/* Desktops and laptops ----------- */
    @media only screen
    and (min-width : 1224px) {
    /* Styles */
    }
     
    /* Large screens ----------- */
    @media only screen
    and (min-width : 1824px) {
    /* Styles */
    }
    
    /* old Smartphones (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 320px)
    and (max-device-width : 480px) {
    /* Styles */
    }
     
    /* old Smartphones (landscape) ----------- */
    @media only screen
    and (min-width : 321px) {
    /* Styles */
    }
     
    /* old Smartphones (portrait) ----------- */
    @media only screen
    and (max-width : 320px) {
    /* Styles */
    }
    
    /* iPhone 4 ----------- */
    @media
    only screen and (-webkit-min-device-pixel-ratio : 1.5),
    only screen and (min-device-pixel-ratio : 1.5) {
    /* Styles */
    }
     
    /* 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 */
    }
    
    /* Android Tablet (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 800px)
    and (max-device-width : 1280px) {
    /* Styles */
    }
     
    /* Android Tablet (landscape) ----------- */
    @media only screen
    and (min-device-width : 800px)
    and (max-device-width : 1280px)
    and (orientation : landscape) {
    /* Styles */
    }
     
    /* Android Tablet (portrait) ----------- */
    @media only screen
    and (min-device-width : 800px)
    and (max-device-width : 1280px)
    and (orientation : portrait) {
    /* Styles */
    }
     
    /* Desire + Galaxy S2 (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 480px)
    and (max-device-width : 800px) {
    /* Styles */
    }
     
    /* Desire + Galaxy S2 (landscape) ----------- */
    @media only screen
    and (min-device-width : 480px)
    and (max-device-width : 800px)
    and (orientation : landscape) {
    /* Styles */
    }
     
    /* Desire + Galaxy S2 (portrait) ----------- */
    @media only screen
    and (min-device-width : 480px)
    and (max-device-width : 800px)
    and (orientation : portrait) {
    /* Styles */
    }

以上是关于CSS Android和Iphone - 现代css媒体查询的主要内容,如果未能解决你的问题,请参考以下文章

iphone和android的css区别?

iphone 4 android 4.1 上的平滑 CSS3 过渡

css iPhone 6 Plus和iPad Air 2媒体查询(Retina HD显示屏)。也适用于类似的Android设备。

css iPhone 6 Plus和iPad Air 2媒体查询(Retina HD显示屏)。也适用于类似的Android设备。

Phonegap-(Android/iphone) 多张图片的图库有问题吗?

iPhone - 数据 URI(css 背景图像)仅在连接到 WIFI 时有效