弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
device-height
CSS
media feature
can be used to test the height of an output device's rendering surface.
device-height
feature is specified as a
<length>
value. It is a range feature, meaning that you can also use the prefixed
min-device-height
and
max-device-height
variants to query minimum and maximum values, respectively.
<link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" />
| 规范 | 状态 | 注释 |
|---|---|---|
|
Media Queries Level 4
The definition of 'device-height' in that specification. |
候选推荐 | Deprecated in Media Queries Level 4. |
|
Media Queries
The definition of 'device-height' in that specification. |
推荐 | 初始定义。 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
device-height
media feature
弃用
非标
|
Chrome 完整支持 1 | Edge 完整支持 12 | Firefox 完整支持 2 | IE 完整支持 9 | Opera 完整支持 10 | Safari 完整支持 3 | WebView Android 完整支持 ≤37 | Chrome Android 完整支持 18 | Firefox Android 完整支持 4 | Opera Android 完整支持 10.1 | Safari iOS 完整支持 1 | Samsung Internet Android 完整支持 1.0 |
完整支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。