“word-break: break-all"和“word-break: break-all"有什么区别?与“自动换行:断字"在 CSS 中 [英] What is the difference between "word-break: break-all" versus "word-wrap: break-word" in CSS

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

问题描述

我目前想知道两者之间有什么区别.当我同时使用两者时,如果它不适合容器,它们似乎会打破这个词.但是为什么 W3C 做出了两种方式来做到这一点?

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?

推荐答案

会说话的 W3 规范关于这些似乎表明 word-break: break-all 用于要求对 CJK(中文、日语和韩语)文本进行特定行为,而 word-wrap:break-word 是更一般的、非 CJK 感知的行为.

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"有什么区别?与“自动换行:断字"在 CSS 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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