最大高度 | @viewport.max-height (Device Adaptation) - CSS 中文開發手冊 - Break易站

 
  •   CSS 中文開發手冊

    最大高度 | @viewport.max-height (Device Adaptation) - CSS 中文開發手冊css

    max-heightCSS描述符指定經過定義的文檔的視口的最大高度@viewportat-rule。html

    考慮到最大高度約束,初始高度將盡量接近初始視口高度。瀏覽器

    Related at-ruleide

    @viewportorm

    初始值htm

    autoip

    Percentagesci

    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

    語法

    /* Keyword value */
    max-height: auto;
    
    /* <length> values */
    max-height: 400px;
    max-height: 50em;
    max-height: 20cm;
    
    /* <percentage> value */
    max-height: 75%;

    auto使用的值是從其餘CSS描述符的值中計算出來的。<length>非負的絕對或相對長度。<percentage>相對於初始視口高度的百分比值,垂直長度縮放係數爲1.0。必須是非負的。

    正式語法

    <viewport-length>where 
    <viewport-length> = auto | <length-percentage>
    where 
    <length-percentage> = <length> | <percentage>

    示例

    @viewport {
      max-height: 600px;
    }

    規範

    Specification

    Status

    Comment

    CSS Device AdaptationThe definition of '"max-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

     
  •   CSS 中文開發手冊
相關文章
相關標籤/搜索