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

最小高度 | @viewport.min-height

min-heightCSS描述符指定通过@viewport的at-rule定义的一个文件视区的最小高度。

考虑到最小高度限制,最初将高度设置为尽可能接近初始视口高度。

Related at-rule

@viewport

初始值

auto

百分比值

refer to the height of the initial viewport

媒体

visual, continuous

计算值

if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto

规范顺序

the unique non-ambiguous order defined by the formal grammar

语法

代码语言:javascript
复制
/* Keyword value */
min-height: auto;

/* <length> values */
min-height: 120px;
min-height: 20em;
min-height: 10cm;

/* <percentage> value */
min-height: 25%;

auto使用的值是从其他CSS描述符的值中计算出来的。

<length>非负的绝对或相对长度。

<percentage>相对于初始视口高度的百分比值,对于垂直长度,缩放系数为1.0。必须是非负的。

形式语法

代码语言:javascript
复制
<viewport-length>where 
<viewport-length> = auto | <length-percentage>
where 
<length-percentage> = <length> | <percentage>

代码语言:javascript
复制
@viewport {
  min-height: 200px;
}

规范

Specification

Status

Comment

CSS Device AdaptationThe definition of '"min-height" descriptor' in that specification.

Working Draft

Initial definition

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

29 (behind a flag)

No support

10 -ms

11.10 Removed in 15 Reintroduced behind a flag in 16

No support

Feature

Android

Chrome for Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

4.4

29

No support

10-ms

11.10 Removed in 15 Reintroduced behind a flag in 16

No support

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com