Force No Line wrapping
div{
white-space:nowrap;
}
Wrap Line
div{
word-wrap:break-word;
word-break:normal;
}
Force word breaking in English
div{
word-break:break-all;
}
CSS settings do not change careers:
Overflow:hidden Hide
White-space:normal Default
Pre newline and other whitespace characters will be protected
NoWrap forces all text to be displayed in the same line until the text ends or the BR object is encountered
To set the line breaking:
Word-break:
normal; Allow line wrapping in words according to the Asian and non-Asian language text rules
Break-all: This behavior is the same as normal for Asian languages. Also allows any word in a non-Asian text line to be disconnected. This value is appropriate for Asian text that contains some non-Asian text
Keep-all: Same as normal for all non-Asian languages. For Chinese, Korean, Japanese, word is not allowed to break. Suitable for non-Asian texts containing a small amount of Asian text and a high resolution between
English does not change line
CSS plus word-break:break-all; Solve the problem. This problem only IE only, in the FF test, FF can add their own scroll bar, so it does not affect the effect
Suggest everybody do skin, remember in the body Riga Word-break:break-all; This will solve the problem that IE frame is spread by English.
The following refers to the description of Word-break, noting that Word-break is a ie5+ proprietary property
Grammar:
Word-break:normal | Break-all | Keep-all
Parameters:
Normal: Allows wrapping within a word according to the Asian and non-Asian language text rules
Break-all: This behavior is the same as normal for Asian languages. Also allows any word in a non-Asian text line to be disconnected. This value is appropriate for Asian text that contains some non-Asian text
Keep-all: Same as normal for all non-Asian languages. For Chinese, Korean, Japanese, word is not allowed to break. Non-Asian text for small amounts of Asian text
Description
Sets or retrieves the word wrapping behavior within the text within an object. Especially when it comes to multiple languages.
For Chinese, you should use Break-all.
The corresponding script attribute is wordbreak. Please refer to other bibliographies I have written.
Example:
div {word-break:break-all;}