Here's a simple implementation of a CSS code that makes plain English digital wrap. Content is very good, now share to everyone, but also for everyone to make a reference.
When a block element that defines the width is filled with all plain English or pure numbers, the container will be large in IE and FF and will not be wrapped automatically.
And when the numbers or English with Chinese characters, will be changed from the Chinese characters line, and pure Chinese characters can be automatically wrapped. How to solve this problem? Let's meet two characters Word-wrap and Word-break.
Word-wrap is used to control CSS wrapping.
Two types of values:
(1) Normal
(2) Break-word(this value is used to force line wrapping, the content will be wrapped within the boundary, there is no problem in Chinese, the English sentence is OK.) 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(the word is broken.) The next letter is automatically to the next line when the word is to the border. It mainly solves the problem of long strings of English. )
(3) Keep-all(refers to Chinese, Japanese, and Korean constant 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;
The above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!