`

常见移动设备的 CSS3 Media Query 整理

 
阅读更多
http://my.oschina.net/jsan/blog/603377

/**
 * iPhone 4/4s landscape & portrait
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-device-pixel-ratio: 2)
and (device-aspect-ratio: 2/3) {
 
}
 
/**
 * iPhone 4/4s portrait
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-device-pixel-ratio: 2)
and (device-aspect-ratio: 2/3)
and (orientation:portrait)  {
 
}
 
/**
 * iPhone 4/4s landscape
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-device-pixel-ratio: 2)
and (device-aspect-ratio: 2/3)
and (orientation:landscape) {
 
 
}
 
/**
 *  iPhone 5/5s landscape & portrait
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 568px)
and (-webkit-min-device-pixel-ratio: 2) {
 
 
}
 
/**
 *  iPhone 5/5s portrait
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 568px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: portrait) {
 
}
 
/**
 *  iPhone 5/5s landscape
 */@media only screen
and (min-device-width: 320px)
and (max-device-width: 568px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: landscape) {
 
 
}
 
/**
 *  iPhone 5/5s landscape & portrait
 */@media only screen
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {
 
}
 
/**
 *  iPhone 5/5s portrait
 */@media only screen
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3)
and (orientation: portrait) {
 
}
 
/**
 *  iPhone 5/5s landscape
 */@media only screen
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3)
and (orientation: landscape) {
 
}
 
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : portrait) { 
    //iPhone 6 Portrait}
     
    @media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : landscape) { 
    //iPhone 6 landscape
     
    }@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) { 
    //iPhone 6+ Portrait}
     
    @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : landscape) { 
    //iPhone 6+ landscape}
     
    @media only screen and (max-device-width: 640px), only screen and (max-device-width: 667px), only screen and (max-width: 480px){ 
    //iPhone 6 and iPhone 6+ portrait and landscape}
     
    @media only screen and (max-device-width: 640px), only screen and (max-device-width: 667px), only screen and (max-width: 480px) and (orientation : portrait){ 
    //iPhone 6 and iPhone 6+ portrait}
     
    @media only screen and (max-device-width: 640px), 
only screen and (max-device-width: 667px), 
only screen and (max-width: 480px) 
and (orientation : landscape){ 
    //iPhone 6 and iPhone 6+ landscape}
     
/**
 *  Galaxy S3 landscape & portrait
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 2) {
 
}/**
 *  Galaxy S3 portrait
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 2)
and (orientation: portrait) {
 
}/**
 *  Galaxy S3 landscape
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 2)
and (orientation: landscape) {
 
}/**
 *  Galaxy S4 landscape & portrait
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3) {
 
}/**
 *  Galaxy S4 portrait
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: portrait) {
 
}/**
 *  Galaxy S4 landscape
 */@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: landscape) {
 
}/**
 *  Galaxy S5 landscape & portrait
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3) {
 
}/**
 *  Galaxy S4 portrait
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: portrait) {
 
}/**
 *  Galaxy S4 landscape
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: landscape) {
 
}/**
 *  HTC One landscape & portrait
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3) {
 
}/**
 *  HTC One portrait
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: portrait) {
 
}/**
 *  HTC One landscape
 */@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: landscape) {
 
}/**
 *  iPad Mini landscape & portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad Mini portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: portrait)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad Mini landscape
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad 1/2 landscape & portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad 1/2 portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: portrait)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad 1/2 landscape
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 1) {
 
}/**
 *  iPad 3/4 landscape & portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 2) {
 
}/**
 *  iPad 3/4 portrait
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: portrait)
and (-webkit-min-device-pixel-ratio: 2) {
 
}/**
 *  iPad 3/4 landscape
 */@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2) {
 
}/**
 *  Galaxy Tab 10.1 landscape & portrait
 */@media(min-device-width: 800px)
and (max-device-width: 1280px) {
 
}/**
 *  Galaxy Tab 10.1 portrait
 */@media(max-device-width: 800px)
and (orientation: portrait) {
 
}/**
 *  Galaxy Tab 10.1 landscape
 */@media(max-device-width: 1280px)
and (orientation: landscape) {
 
}/**
 *  Asus Nexus 7 landscape & portrait
 */@media screen
and (device-width: 601px)
and (device-height: 906px)
and (-webkit-min-device-pixel-ratio: 1.331)
and (-webkit-max-device-pixel-ratio: 1.332) {
 
}/**
 *  Asus Nexus 7 portrait
 */@media screen
and (device-width: 601px)
and (device-height: 906px)
and (-webkit-min-device-pixel-ratio: 1.331)
and (-webkit-max-device-pixel-ratio: 1.332)
and (orientation: portrait) {
 
}/**
 *  Asus Nexus 7 landscape
 */@media screen
and (device-width: 601px)
and (device-height: 906px)
and (-webkit-min-device-pixel-ratio: 1.331)
and (-webkit-max-device-pixel-ratio: 1.332)
and (orientation: landscape) {
 
}/**
 *  Kindle Fire HD 7" landscape & portrait
 */@media only screen
and (min-device-width: 800px)
and (max-device-width: 1280px)
and (-webkit-min-device-pixel-ratio: 1.5) {
 
}/**
 *  Kindle Fire HD 7" portrait
 */@media only screen
and (min-device-width: 800px)
and (max-device-width: 1280px)
and (-webkit-min-device-pixel-ratio: 1.5)
and (orientation: portrait) {
}/**
 *  Kindle Fire HD 7" landscape
 */@media only screen
and (min-device-width: 800px)
and (max-device-width: 1280px)
and (-webkit-min-device-pixel-ratio: 1.5)
and (orientation: landscape) {
 
}/**
 *  Kindle Fire HD 8.9" landscape & portrait
 */@media only screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1.5) {
 
}/**
 *  Kindle Fire HD 8.9" portrait
 */@media only screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1.5)
and (orientation: portrait) {
}/**
 *  Kindle Fire HD 8.9" landscape
 */@media only screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1.5)
and (orientation: landscape) {
 
}/**
 *  Non-Retina Screens
 */@media screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {
}/**
 *  Retina Screens
 */@media screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 2)
and (min-resolution: 192dpi) {
}/**
 *  Apple Watch
 */@media(max-device-width: 42mm)
and (min-device-width: 38mm) {
 
}/**
 *  Moto 360 Watch
 */@media(max-device-width: 218px)
and (max-device-height: 281px) {
 
}
分享到:
评论

相关推荐

    CSS3 Media Query CSS3媒介查询

    总之,CSS3 Media Queries是构建现代、响应式网页设计不可或缺的一部分,它让开发者可以灵活地针对不同设备制定样式策略,从而提升网页的可用性和用户体验。随着移动设备的普及,掌握这一技术对于任何前端开发者来说...

    使用CSS3-Media-Query技术适配Android平板屏幕分辨率和屏幕密度.docx

    使用CSS3 Media Query技术适配Android平板屏幕分辨率和屏幕密度 在移动应用开发中,适配各种Android平板设备的分辨率和屏幕密度是一个棘手的问题。使用CSS3 Media Query技术可以轻松解决这个问题。Media Query是一...

    用css3 media queries创建手机版网站

    ### 使用CSS3 Media Queries创建手机版网站 随着手持设备如智能手机和平板电脑的快速发展,网站适应各种屏幕尺寸变得尤为重要。CSS3 Media Queries作为一种强大的工具,帮助设计师和开发者针对不同类型的设备定制化...

    彻底弄明白CSS3

    ### 彻底弄明白CSS3:深入理解Media Queries #### CSS3 Media Queries概述 随着移动互联网的迅猛发展,网页设计面临着前所未来的挑战:如何确保同一网站在不同尺寸、不同类型的设备上都能拥有良好的视觉效果和用户...

    css3登录界面

    5. **响应式布局**:使用媒体查询(`@media query`)实现不同设备屏幕尺寸下的适配,确保登录界面在手机、平板和桌面电脑上都能良好显示。 6. **输入框和按钮样式**:使用CSS3可以自定义输入框`input[type="text"]`...

    jQuery和CSS3超酷3D多层图片视觉差互动特效.zip

    5. **响应式设计**:为了确保在各种设备和屏幕尺寸上都能良好运行,可能还使用了媒体查询(`@media query`),使特效能够适应不同的显示环境。 6. **性能优化**:为了减少重绘和回流,可能采用了硬件加速(如设置`...

    respond:让ie678支持css3的media query

    如果您不熟悉围绕响应式网页设计的概念,您可以阅读和(颜色更改以显示媒体查询工作)使用说明使用最小/最大宽度媒体查询制作您的 CSS,以适应您从移动设备(首先)一直到桌面设备的布局 @media screen and (min-...

    飞机大战游戏(html+css3+js)

    同时,CSS3的媒体查询(media query)还能让游戏在不同设备上自适应显示,提升用户体验。 最后,JavaScript作为前端的核心语言,承担了游戏的逻辑处理和交互功能。在这个游戏中,JavaScript控制着飞机的移动、射击...

    我的个人资料:这是我使用Html5,Css3和Media Query的个人作品集

    Media Queries是CSS3的一个重要组成部分,它允许开发者根据设备特性(如屏幕尺寸、分辨率、方向等)来应用不同的样式规则。这使得网站可以适应不同大小的屏幕,从而实现响应式设计。例如,一个常见的媒体查询可能...

    css3仿梦幻西游场景动画特效

    8. **响应式设计**:CSS3的媒体查询(`@media query`)使得设计能够适应不同设备和屏幕尺寸,确保在手机、平板和电脑上都能呈现出良好的视觉效果。 9. **Web 字体**:CSS3允许我们使用自定义字体,提升网站的视觉风格...

    media type(媒体类型)与media query(媒体查询)简介及使用方法介绍

    media query(媒体查询)是对media type的一种增强,是CSS 3的重要内容之一。随着移动互联网的发展,media query开始得到大家的重视。 media type 让我们先了解一下media type,其实这个大家会比较熟悉一点,我们通常...

    网站菜单css3

    考虑到移动设备的普及,菜单还需要适应不同的屏幕尺寸。可以使用媒体查询(media query)来实现响应式布局: ```css @media (max-width: 768px) { .menu li { display: inline-block; } .menu ul { display: ...

    css经典横向菜单,多种样式

    对于移动设备,可能需要将横向菜单转换为垂直布局。可以使用媒体查询(media query)来实现响应式布局。 ```css @media (max-width: 767px) { .horizontal-menu li { display: block; } } ``` 5. **交互...

    animeta-Mediaquery

    在IT行业中,特别是Web开发领域,"animeta-Mediaquery" 指的是一种利用CSS Media Queries技术来实现动漫媒体查询的应用。这个标题暗示我们将会探讨如何为不同的设备和屏幕尺寸设计适应性的动漫效果,特别是在HTML...

    ratchet用简单的HTMLCSS和JavaScript组件创建移动应用

    此外,Ratchet也遵循移动优先的原则,这意味着设计的界面会首先考虑手机和平板的屏幕尺寸,然后通过媒体查询(media query)来适应桌面等大屏幕设备。这使得应用在各种设备上都能保持一致的视觉效果和操作体验。 ...

Global site tag (gtag.js) - Google Analytics