device-height CSS media feature 可以用来测试设备的渲染高度。注意,该条媒体查询将会在 媒体查询 level4(目前处于候选草案)中废弃
语法
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.
例子
在高度低于 800px 时加载指定样式
<link
rel="stylesheet"
media="screen and (max-device-height: 799px)"
href="http://foo.bar.com/short-styles.css" />
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
