CSS - 换行

word-wrap:break-word

功能:强制换行,但是英文单词不会被折断;

Allows line breaking within words

break-word Content wraps to next line, and a word-break occurs when necessary.

word-break:break-all;

功能:强制换行,连长的英文单词也会被折断;

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.

你可能感兴趣的:(css)