UI

CSS中处理英文换行的Word-Break

首先需要启动这一句

word-wrap:break-word;

表示在必要的时候就自动换行
Word-Wrap的默认值是Normal
Normal状态下会导致字的内容超过框架的高度/宽度

然后设置Word-Break的值为

word-break:normal;

Word-Break用于控制断句的方式
有三种的值:

normal Default. Allows line breaking within words.
break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text.(!会导致英文撕词)
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.

分类: UI

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部