Force no line breaks
div{
white-space:nowrap;
}
Auto wrap
div{
word-wrap: break-word;
word-break: normal;
}
Force English word line break
div{
word-break:break-all;
}
CSS settings are not redirected:
overflow:hidden hide
white-space: normal default
pre Newlines and other whitespace characters will be protected
nowrap forces all text to be displayed on the same line until the end of the text or a br object is encountered
Set forced line wrapping:
word-break:
normal ; allow line breaks within words according to text rules for Asian and non-Asian languages
break-all : The behavior is the same as normal for Asian languages. Breaks within any word of a line of non-Asian language text are also allowed. This value is suitable for Asian text that contains some non-Asian text
keep-all : Same as normal for all non-Asian languages. For Chinese, Korean, and Japanese, word breaks are not allowed. Suitable for high resolution between non-Asian text and small amounts of Asian text
The problem is solved by adding word-break: break-all; to CSS
that does not break English lines
.This problem only exists in IE. When tested under FF, FF can add scroll bars by itself, which does not affect the effect.
It is recommended that when doing Skin, remember to add word-break: break-all; in the body. This can solve the problem of IE's frame being blocked by English.
Regarding
the problem of opening
, the following quote is from the description of word-break. Note that word-break is an IE5+ proprietary attributesyntax:
word-break: normal | break-all | keep-all
parameters:
normal: according to the text rules of Asian languages and non-Asian languages , allowing line breaks within words
break-all : The behavior is the same as normal for Asian languages. Breaks within any word of a line of non-Asian language text are also allowed. This value is suitable for Asian text that contains some non-Asian text
keep-all : Same as normal for all non-Asian languages. For Chinese, Korean, and Japanese, word breaks are not allowed. Suitable for non-Asian text that contains a small amount of Asian text
Description:
Sets or retrieves the intraword wrapping behavior for text within an object. Especially when multiple languages appear.
For Chinese, break-all should be used.
The corresponding script feature is wordBreak. Please see other books I have written.
Example:
div {word-break : break-all; }