device-width:<length>
接受min/max前缀:是
min
和max
前缀,因此可以派生出min-device-width
和max-device-width
两个媒体特性。
简单列举几个应用示例:
@media screen and (device-width: 1024px){ … }
@import url(example.css) screen and (min-device-width: 800px);
IE | Edge | Firefox | Chrome | Safari | Opera | iOS Safari |
Android Browser |
Blackberry Browser |
Opera Mobile |
Chrome for Android |
Firefox for Android |
IE Mobile |
UC Browser for Android |
Samsung Internet |
QQ Browser |
Baidu Browser |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5.5-8 | 12+ | 2-3 | 4-25 #1 | 3.1-3.2 #1 | 9 | 3.2-6.1 #1 | 2.1-4.3 #1 | 7+ | 10+ | 61 | 56 | 10-11 #1 | 11.4 | 4+ | 1.2 | 7.12 |
9-11 #1 | 3.5+ | 26+ | 4-6 #1 | 9.5+ | 7.0+ | 4.4+ | ||||||||||
6.1+ |