Word-wrap controls the line feed. Optional values: word-wrap: break-word | normal | break-all | keep-all
Break-word: it is mainly used to control whether to forcibly wrap words. It has no problem with Chinese and English, but is invalid for long strings.
Normal: the English word is not separated. It is the default value.
Break-all mainly solves the problem of long strings in English. It is mainly used to disconnect words. When a word reaches the boundary, the next letter automatically goes to the next line.
Keep-all refers to continuous words between Chinese, Japanese, and words. That is to say, in this case, word-wrap is not used, and the Chinese text will not wrap. (The English statement is normal .)
IE: Use word-wrap: break-word; all are normal.
FF: If none of the two are used, there will be no problem with Chinese. There are no problems with English statements. However, long strings may cause problems in English.
To solve the problem of long strings in English, word-wrap: break-word; word-break: break-all; is generally used ;. However, this method causes the words in Common English statements to be disconnected (also in ie ).
The best way is word-wrap: break-word; overflow: hidden;
Instead of word-wrap: break-word; word-break: break-all;
It is not word-wrap: break-word; overflow: auto;
(Firefox) continuous disconnection of English characters and Arabic numbers. All Firefox versions do not solve this problem. We only need to hide the characters that exceed the boundary or add a scroll bar to the container.
# Wrap {word-break: break-all; width: 200px; overflow: auto ;}
<Div id = "wrap"> abcdefghijklmnabcdefghijklmnabcdefghijklmn1111111 </div>
Effect: the container is normal and the content is hidden.