media features device-height

语法:

device-height<length>

取值:

<length>
用长度值来定义高度。不允许负值

说明:

定义输出设备的屏幕可见高度。
  • 本特性接受min和max前缀,因此可以派生出min-device-heightmax-device-height两个媒体特性。
  • 简单列举几个应用示例:

    @media screen and (device-height:800px){ … }
    
    @import url(example.css) screen and (min-device-height:800px);
    
    <link media="screen and (min-device-height:300px) and (max-device-height:900px)" rel="stylesheet" href="example.css" />
    
    

兼容性:

  • 浅绿 = 支持
  • 红色 = 不支持
  • 墨绿 = 部分支持
  • 橙色 = 实验性质
支持版本\类型 IE Firefox Safari Chrome Opera
较早版本 6.0-8.0 4.0-6.0 5.1 13.0 11.50-11.51
较近版本 9.0

示例: