【问题标题】:css3 word-wrap:break-word / break-all, no hyphencss3 word-wrap:break-word / break-all,没有连字符
【发布时间】:2013-01-09 04:37:44
【问题描述】:

CSS3 规范说部分支持 word-wrap:break-word; 在 Chrome 中你必须使用 word-wrap:break-all; 但没有连字符。我正在使用text-align:justify; 有没有人想出一个解决方案来让 chrome 中的断字出现连字符?

我已经多次看到这个问题,但没有找到完整的解决方案。

这是我目前如何使用它的代码示例。

    .threecolumn {
      -moz-column-width: auto;
      -moz-column-count: 3;
      -moz-column-gap: 20px;
      -moz-column-rule-color: none;
      -moz-column-rule-style: none;
      -moz-column-rule-width: 0;
      -webkit-column-width: auto;
      -webkit-column-count: 3;
      -webkit-column-gap: 20px;
      -webkit-column-rule-color: none;
      -webkit-column-rule-style: none;
      -webkit-column-rule-width: 0;
      column-width: auto;
      column-count: 3;
      column-gap: 20px;
      column-rule-color: none;
      column-rule-style: none;
      column-rule-width: 0;
      text-align: justify;
      -webkit-hyphens: auto;
      -moz-hyphens: auto;
      -ms-hyphens: auto;
      hyphens: auto;
      word-wrap: break-word;
      word-break:break-all; /* chrome, no hyphens :( */
    }

jsFiddle

作品在 FF 和 Safari 中找到。

使用: 火狐:17 铬:23 野生动物园:6.0.2

【问题讨论】:

  • Chrome 尚不支持 CSS3 连字符

标签: css google-chrome text-align hyphenation word-break


【解决方案1】:

Google Chrome 不支持 CSS4“连字符”功能:http://generatedcontent.org/post/44751461516/finer-grained-control-of-hyphenation-with-css4-text

我刚刚询问了支持他们是否可以为该属性添加功能/支持。希望他们添加它............

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-17
    • 1970-01-01
    • 2012-07-30
    • 2023-03-05
    • 2011-04-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多