常見移動(dòng)設(shè)備的 CSS3 Media Query 整理(iPhone/iPad/Galaxy/HTC One etc.)

轉(zhuǎn)自:常見移動(dòng)設(shè)備的 CSS3 Media Query 整理(iPhone/iPad/Galaxy/HTC One etc.)

@charset "utf-8";

/**

  • 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) {

}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 一、使用真實(shí)手機(jī)測試未發(fā)布網(wǎng)頁的方法 方法① 在虛擬機(jī)中搭建xampp,將文件通過FTP傳到虛擬機(jī),在一個(gè)局域網(wǎng)中...
    fastwe閱讀 810評論 0 0
  • 超高速音視頻編碼器用法: ffmpeg [options] [[infile options] -i infile...
    吉兇以情遷閱讀 4,827評論 0 4
  • Mobile Web Favorites 參與貢獻(xiàn) 移動(dòng)前端開發(fā)收藏夾,歡迎使用Issues以及 Pull Req...
    柴東啊閱讀 969評論 0 2
  • 這篇文字里我會(huì)介紹50 個(gè)便于使用的 CSS2/CSS3 代碼片段給所有的WEB專業(yè)人員. 選擇IDE開發(fā)環(huán)境來存...
    JamHsiao_aaa4閱讀 1,964評論 0 3
  • 從11.19號基金訓(xùn)練營開課到現(xiàn)在十多天的時(shí)間里,我收獲了很多的東西,也成長了很多。尤其是自己思維方式,刷新...
    風(fēng)鈴苦澀淺笑傾傷了回閱讀 1,445評論 5 80

友情鏈接更多精彩內(nèi)容