"word-break: break-all" 和 "word-break: break-all" 有什么区别?与“word-wrap:break-word"相比在 CSS 中 [英] What is the difference between "word-break: break-all" versus "word-wrap: break-word" in CSS

查看:25
本文介绍了"word-break: break-all" 和 "word-break: break-all" 有什么区别?与“word-wrap:break-word"相比在 CSS 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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 ways to do it?

解决方案

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.

这篇关于"word-break: break-all" 和 "word-break: break-all" 有什么区别?与“word-wrap:break-word"相比在 CSS 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆