device-height - CSS(层叠样式表) 编辑
已废弃
该特性已经从 Web 标准中删除,虽然一些浏览器目前仍然支持它,但也许会在未来的某个时间停止支持,请尽量不要使用该特性。
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
Specification | Status | Comment |
---|---|---|
Media Queries Level 4 device-height | Candidate Recommendation | Deprecated in Media Queries Level 4. |
Media Queries device-height | Recommendation | Initial definition. |
Browser compatibility
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论