【发布时间】:2015-11-12 16:50:00
【问题描述】:
我使用以下 css 在我的网站中自动添加连字符:
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
但在 chrome 中,这没有效果。我已经读过,那个 chrome 不支持这个。 chrome中的断字有什么解决方法吗? 谢谢!
【问题讨论】:
-
没有纯 CSS 解决方案。但是如果使用 javascripit 是可以的,请查看这个 javascript 库link
-
为这个铬问题加注星标并发表评论:bugs.chromium.org/p/chromium/issues/detail?id=47083
-
chrome 团队正在处理这个问题:bugs.chromium.org/p/chromium/issues/detail?id=605840
-
自 2016 年 11 月起适用于 Mac/Android Chrome,但不适用于 Windows。
-
在 Chrome (62.0) 中,您目前可以使用
hyphens: initial撤消以前的hyphens: none(并允许在­处使用断字),尽管该属性似乎不支持设置任何其他特定值比none.
标签: css google-chrome css-hyphens