zoukankan      html  css  js  c++  java
  • 文本对齐 | text-justify (Text)

  •   CSS 中文开发手册

    文本对齐 | text-justify (Text) - CSS 中文开发手册

    该text-justifyCSS属性定义当文本设定为justified时,应该应用什么类型的对齐方式(即,有如下设定:text-align: justify;时)。

    text-justify: none;
    text-justify: auto;
    text-justify: inter-word;
    text-justify: inter-character;
    text-justify: distribute; /* Deprecated value */

    Initial value

    auto

    Applies to

    inline-level and table-cell elements

    Inherited

    yes

    Media

    visual

    Computed value

    as specified

    Animation type

    discrete

    Canonical order

    the unique non-ambiguous order defined by the formal grammar

    语法

    该text-justify属性被指定为下面的列表中的任意一个关键字。

    可能的值

    none——文本对齐关闭。这与完全没有设置text-align的效果相同,但是如果由于某种原因需要打开和关闭对齐功能时,该设定就很有用了。

    auto——浏览器根据性能和质量之间的平衡,选择适合当前情况的最佳类型,并且要求最适合当前文本语言(例如,英语,中日韩语言等)。如果text-justify没有设置,则这是默认的对齐方式。

    inter-word——通过在单词之间添加空格(适时改变word-spacing)来使文本分布最为合适,这对于使用空格(例如英语或韩语)分隔单词的语言是最合适的。

    inter-character——通过在字符之间添加空格来有效地改变文本是合理的(适时改变letter-spacing),这对日语等语言来说是最合适的。

    distribute——表现与inter-word相同,该值为保持向后兼容性而保留。

    形式语法

    auto | inter-character | inter-word | none

    实例

    p {
      font-size: 1.5em;
      border: 1px solid black;
      padding: 10px;
       95%;
      margin: 10px auto;
      text-align: justify;
    }
    
    .none {
      text-justify: none;
    }
    
    .auto {
      text-justify: auto;
    }
    
    .dist {
      text-justify: distribute;
    }
    
    .word {
      text-justify: inter-word;
    }
    
    .char {
      text-justify: inter-character;
    }

    规范

    Specification

    Status

    Comment

    CSS Text Module Level 3The definition of 'text-justify' in that specification.

    Working Draft

    浏览器兼容性

    Feature

    Chrome

    Edge

    Firefox (Gecko)

    Internet Explorer

    Opera

    Safari

    Basic support

    No support2

    141

    55.0 (55.0)

    111

    No support2

    No support

    Feature

    Android

    Chrome for Android

    Edge

    Firefox Mobile (Gecko)

    IE Mobile

    Opera Mobile

    Safari Mobile

    Basic support

    No support2

    No support2

    141

    55.0 (55.0)

    111

    No support2

    No support

  •   CSS 中文开发手册
    转载请保留页面地址:https://www.breakyizhan.com/css/31999.html
  • 相关阅读:
    yum安装Mysql
    在Centos上安装xtrabackup,对Mysql做备份
    Linux下使用yum安装Mysql之后,无法登陆mysql
    手动产生replication中的系统SP
    MySQL全面瓦解1:安装部署与准备
    开发笔记:PDF生成文字和图片水印
    调试与优化:一次数据中心看板 T+1 改 T+0 优化过程
    MySQL:SELECT COUNT 小结
    系统架构设计:平滑发布和ABTesting
    linux /dev/mapper/centos-root目录莫名其妙被占满
  • 原文地址:https://www.cnblogs.com/breakyizhan/p/13211232.html
Copyright © 2011-2022 走看看