How can I use hyphenation in Google Chrome browser?

给你一囗甜甜゛ 提交于 2019-11-27 14:23:25

问题


I use the following css to auto hyphen text in my website:

-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;

But in chrome this has no effect. I already read, that chrome doesn't support this. Is there any workaround for hyphenation in chrome? Thanks!


回答1:


Hyphenation is currently supported on Chrome only on Android and macOS (and only the "auto" value), as you can see here: http://caniuse.com/#search=hyphens

I used Hyphenator too, as suggested by Eric.




回答2:


Soft hyphens can be applied with JavaScript (best solution) or any server-side language, however, that answers the question with its own answer.



来源:https://stackoverflow.com/questions/32094626/how-can-i-use-hyphenation-in-google-chrome-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!