What is the difference between “word-break: break-all” versus “word-wrap: break-word” in CSS

前端 未结 10 1296
离开以前
离开以前 2020-11-22 07:39

I am currently wondering what is the difference between the two. When I used both they seem to break the word if it is not fitting the container. But why did W3C made two wa

10条回答
  •  不知归路
    2020-11-22 08:01

    The W3 specification that talks about these seem to suggest that word-break: break-all is for requiring a particular behaviour with CJK (Chinese, Japanese, and Korean) text, whereas word-wrap: break-word is the more general, non-CJK-aware, behaviour.

提交回复
热议问题