【发布时间】: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 :( */
}
作品在 FF 和 Safari 中找到。
使用: 火狐:17 铬:23 野生动物园:6.0.2
【问题讨论】:
-
Chrome 尚不支持 CSS3 连字符
标签: css google-chrome text-align hyphenation word-break