How to use automatic CSS hyphens with `word-break: break-all`?

后端 未结 3 1690
粉色の甜心
粉色の甜心 2020-12-01 16:03

I\'m using word-break: break-all; and want to know how I can have the browser automatically insert the hyphens, as demonstrated in an MDN example.

3条回答
  •  情深已故
    2020-12-01 16:32

    Hyphens are inserted if the browser supports & language includes a hyphenation dictionary. But your

    aaaaaaaaaaaaaaaaaa

    isn't in a dictionary.

    Therefore you have to insert soft hyphens ­ to your satisfaction like in https://jsfiddle.net/LJYj3/5/

    Here's more food for thought: https://stackoverflow.com/a/856322/1696030

提交回复
热议问题