CSS implements no line breaks, automatic line breaks, and forced line breaks

Source: Internet
Author: User
Force do not wrap Div {
White-space: nowrap;
} Wrap Div automatically {
Word-wrap: Break-word;
Word-break: normal;
} Force an English word to break a line Div {
Word-break: Break-all;
========================================================== ===== CSS settings do not rotate rows: overflow: hidden hide
White-space: normal default
Pre line breaks and other blank characters will be protected
Nowrap forces all text to be displayed in the same line until the text ends or the BR object settings force line feed
Word-break:
Normal. line breaks are allowed according to the text rules of the Asian and non-Asian languages.
Break-ALL: this behavior is the same as that of the Asian language normal. 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: same as normal in all non-Asian languages. Chinese, Korean, and Japanese cannot be disconnected. It is suitable for non-Asian texts that contain a small number of Asian texts. ============================== after reading the above introduction, give it a try and see the effect! Word-break: Break-all is added to CSS without line breaks. The problem is solved. 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 word-break to the body: break-all; this can solve the problem that the IE framework is opened in English. The following references the description of word-break. Note that word-break is ie5 + proprietary attribute Syntax: Word-break: normal | break-All | keep-All parameter: Normal: line feed is allowed according to the text rules of the Asian and non-Asian languages.
Break-ALL: this behavior is the same as that of the Asian language normal. 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: same as normal in all non-Asian languages. Chinese, Korean, and Japanese cannot be disconnected. It is suitable for non-Asian text instructions that contain a small amount of Asian text: set or retrieve the line feed behavior of text in the 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 ;}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.