标准设备的 Media Queries

/* 智能手机(纵向和横向) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}

/* 智能手机 (横向) ----------- */
@media only screen
and (min-width : 321px) {
/* Styles */
}

/* 智能手机(纵向) ----------- */
@media only screen
and (max-width : 320px) {
/* Styles */
}

/* iPads (纵向和横向) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* Styles */
}

/* iPads (横向) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Styles */
}

/* iPads (纵向) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* Styles */
}

/* 桌面和笔记本电脑 ----------- */
@media only screen
and (min-width : 1224px) {
/* Styles */
}

/* 大屏幕 ----------- */
@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 */
}

via: css-tricks


更新:响应设计需要一个 meta 标签,否则视窗不会用设备的宽度

<meta name="viewport" content="width=device-width, initial-scale=1">