When I was working as an English version of the enterprise site, due to insufficient space, the entire word had a line break, resulting in a large gap between words. For example:
Use CSS attributesWord-break: Break-all;Effect: for example:
Force do not wrap
Div {
White-space: nowrap;
}
Automatic line feed
Div {
Word-wrap: Break-word;
Word-break: normal;
}
Force an English word to break a line
Div {
Word-break: Break-all;
}
CSS settings do not change rows:
Overflow: hidden hide
White-space: normal default
Pre line breaks and other blank characters will be protected
Nowrap
Forcibly display all text in the same row until the text ends or encounters a br object
Set forced line feed:
Word-break:
Normal;
Line breaks are allowed according to the text rules of the Asian and non-Asian languages.
Break-ALL:
This action is the same as normal in the Asian language. It also allows non-Asian text lines to be broken in any word. This value is applicable to Asian texts that contain non-Asian texts.
Keep-ALL:
It is the same as normal in all non-Asian languages. Chinese, Korean, and Japanese cannot be disconnected. This solution is suitable for non-Asian texts that contain a small number of Asian texts.
English without line breaks
Add word-break: Break-all in CSS;
Solve the problem. This problem is only available in IE. In FF test, FF can add a scroll bar by itself, which does not affect the effect.
When skin is recommended, remember to add it to the body.
Word-break: Break-all;
The following references the description of word-break,
Note that word-break is ie5 + proprietary.
Syntax:
Word-break: normal | break-All |
Keep-all
Parameters:
Normal: line breaks are allowed according to the text rules of the Asian and non-Asian languages.
Break-ALL:
This action is the same as normal in the Asian language. It also allows non-Asian text lines to be broken in any word. This value is applicable to Asian texts that contain non-Asian texts.
Keep-ALL:
It is the same as normal in all non-Asian languages. Chinese, Korean, and Japanese cannot be disconnected. Suitable for non-Asian texts that contain a small number of Asian texts
Note:
Set or retrieve the line feed behavior of text in an object. Especially when there are multiple languages.
Use break-all for Chinese characters.
The corresponding script feature is wordbreak. For more information, see my other bibliography.
Example:
Div {word-break:
Break-all ;}