css3自动换行:break-word / break-all,无连字符

时间:2013-01-09 04:37:44

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

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 Chrome:23 Safari:6.0.2

1 个答案:

答案 0 :(得分:1)

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

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