任何一個有想法,所有媒體查詢 ,這將有助於檢測單個設備如:媒體查詢的HTML5應用程序的所有設備
的iOS,iPhone 5,iPhone Ratina顯示,Android手機。 ,iPad,平板電腦?
任何一個有想法,所有媒體查詢 ,這將有助於檢測單個設備如:媒體查詢的HTML5應用程序的所有設備
的iOS,iPhone 5,iPhone Ratina顯示,Android手機。 ,iPad,平板電腦?
去media-queries-for-standard-devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/* Styles */
}
/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) {
/* 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 */
}
/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* Styles */
}
/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}
/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
對於視網膜顯示屏使用
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi) {
/* Retina-specific stuff here */
}
謝謝bhai ..還需要檢測老鼠顯示。 –
@iDevTechnolab:我現在也加了.. !! –
@iDevTechnolab:檢查這太http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/ –