Article Introduction: and when the number or the English language with Chinese characters, will be changed from the Chinese characters, and the pure Chinese characters can be automatically wrapped. How to solve this problem? First come to know the two protagonists word-wrap and Word-break. |
When a block element with a defined width is filled with pure English or pure digits, it will support large containers in IE and FF and will not wrap automatically.
And when the number or the English language with Chinese characters, will be changed from the Chinese characters, and the pure Chinese characters can be automatically wrapped. How to solve this problem? First, get to know the two protagonists word-wrap and Word-break.
word-wrap used to control line wrapping
Two kinds of values:
(1) Normal
(2) Break-word (this value is used to force a newline, the content will be wrapped within the boundary line, there is no problem in Chinese, English sentence is no problem.) But for long strings of English, it doesn't work. )
word-break used to control word breaks.
Three kinds of values:
(1) Normal
(2) Break-all (is disconnected from the word.) The next letter automatically comes to the next line when the word is to the boundary. Mainly solved the long string of English problems. )
(3) Keep-all (refers to Chinese, Japanese, and Korean continuous words, a line of words, can be used to arrange ancient poetry yo ~)
"Workaround"
can be added in CSS
Word-wrap:break-word;
Word-break:break-all;