字母间距 | letter-spacing (Scalable Vector Graphics) – CSS 中文开发手册

2021-01-22 14:16

阅读:675


  • ??CSS 中文开发手册

    字母间距 | letter-spacing (Scalable Vector Graphics) - CSS 中文开发手册

    该letter-spacing CSS属性指定的文本字符之间的间距行为。

    /*  values */
    letter-spacing: 0.3em;
    letter-spacing: 3px;
    letter-spacing: .3px;
    
    /* Keyword values */
    letter-spacing: normal;
    
    /* Global values */
    letter-spacing: inherit;
    letter-spacing: initial;
    letter-spacing: unset;

    初始值

    normal

    适用于

    所有元素。它也适用于:: first-letter和:: first-line。

    遗传

    媒体

    visual

    计算值

    由绝对长度或关键字法线组成的最佳值

    动画类型

    长度

    规范的顺序

    形式语法定义的独特的非模糊顺序

    语法

    normal当前字体的正常字母间距。与值0不同,此值允许用户代理更改字符之间的空格以便对齐文本。

    除了字符之间的默认空格之外,还指定了额外的字符间空格。价值观可能是负面的,但是可能存在实施特定的限制。用户代理可能不会进一步增加或减少字符间空间以证明文本的正确性。

    形式语法

    normal | 

    实例

    HTML

    letter spacing

    letter spacing

    letter spacing

    letter spacing

    CSS

    .first-example  { letter-spacing: 0.4em; }
    .second-example { letter-spacing: 1em; }
    .third-example  { letter-spacing: -0.05em; }
    .fourth-example { letter-spacing: 6px; }

    规范

    Specification

    Status

    Comment

    CSS Text Module Level 3The definition of ‘letter-spacing‘ in that specification.

    Working Draft

    No change.

    CSS TransitionsThe definition of ‘letter-spacing‘ in that specification.

    Working Draft

    Defines letter-spacing as animatable.

    CSS Level 2 (Revision 1)The definition of ‘letter-spacing‘ in that specification.

    Recommendation

    No change.

    Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of ‘letter-spacing‘ in that specification.

    Recommendation

    Initial SVG definition.

    CSS Level 1The definition of ‘letter-spacing‘ in that specification.

    Recommendation

    Initial definition.

    浏览器兼容性

    Feature

    Chrome

    Edge

    Firefox (Gecko)

    Internet Explorer

    Opera

    Safari (WebKit)

    HTML support

    1.0

    (Yes)

    1.0 (1.7 or earlier)

    4.0

    3.5

    1.0 (85)

    SVG support

    (Yes)

    ?

    No support (bug 371787)

    ?

    (Yes)

    (Yes)

    Feature

    Android

    Edge

    Firefox Mobile (Gecko)

    IE Mobile

    Opera Mobile

    Safari Mobile

    HTML support

    ?

    (Yes)

    ?

    ?

    ?

    ?

    SVG support

    ?

    ?

    ?

    ?

    ?

    ?

    
    
  • ??CSS 中文开发手册

  • 评论


    亲,登录后才可以留言!