行高 | line-height (Animations & Transitions) - CSS 中文开发手册 - Break易站

  •   CSS 中文开发手册

    行高 | line-height (Animations & Transitions) - CSS 中文开发手册

    line-heightCSS属性设置用于行所需要的空间,如文本。在块级元素上,它指定元素中行框的最小高度.。对于未替换的内联元素,它指定用于计算行框高度的高度。

    /* Keyword values */
    line-height: normal;
    
    /* Unitless values: use this number multiplied
    by the element's font size */
    line-height: 3.5;
    
    /* <length> values */
    line-height: 3em;
    
    /* <percentage> values */
    line-height: 34%;
    
    /* Global values */
    line-height: inherit;
    line-height: initial;
    line-height: unset;

    初始值

    normal

    适用元素

    all elements. It also applies to ::first-letter and ::first-line.

    是否是继承属性

    yes

    Percentages

    refer to the font size of the element itself

    适用媒体

    visual

    计算值

    for percentage and length values, the absolute length, otherwise as specified

    Animation type

    either number or length

    正规顺序

    the unique non-ambiguous order defined by the formal grammar

    语法

    line-height属性被指定为以下任何一个:

    转载请保留页面地址:https://www.breakyizhan.com/css/32267.html

    posted on 2020-07-03 23:56  MrAit  阅读(249)  评论(0编辑  收藏  举报

    导航