css 标准设备的介质查询来自http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 标准设备的介质查询来自http://css-tricks.com/snippets/css/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 */
}

以上是关于css 标准设备的介质查询来自http://css-tricks.com/snippets/css/media-queries-for-standard-devices/的主要内容,如果未能解决你的问题,请参考以下文章

css 标准设备的媒体查询

CSS 标准设备的媒体查询

css CSS:媒体查询(来自stephen.io的bootstrap +移动设备)

CSS 媒体查询标准设备

css 来自http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

css CSS:Zebra Striping a Table来自http://css-tricks.com/snippets/css/css3-zebra-striping-a-table/