首先需要启动这一句
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.