首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

设备高度 | @media.device-height

@media.device-height

弃用

此功能已从Web标准中删除。虽然有些浏览器可能仍然支持它,但它正在被删除的过程中。如果可能,请避免使用它并更新现有代码;请参见兼容性表在这页的底部指导你的决定。请注意,此功能可能在任何时候停止工作。

device-height CSS @media媒体功能科基于输出设备的呈现表面高度,来应用样式。

语法

device-height功能被指定为一个<length>值。这是一个范围功能,也就是说,您也可以使用前缀min-device-heightmax-device-height变量分别查询最小值和最大值。

例子

此HTML适用于小于800像素的设备的特殊样式表。

代码语言:javascript
复制
<link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" />

规范

Specification

Status

Comment

Media Queries Level 4The definition of 'device-height' in that specification.

Working Draft

Deprecated in Media Queries Level 4.

Media QueriesThe definition of 'device-height' in that specification.

Recommendation

Initial definition.

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

?

?

?

?

?

Feature

Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

?

?

?

?

?

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com