Automatic line feed in DIV and automatic line feed in DIV

Source: Internet
Author: User

Automatic line feed in DIV and automatic line feed in DIV
Word-break: break-all and word-wrap: break-word can automatically wrap the content of a container such as DIV.

Their differences are:

1. word-break: break-all: for example, if the div width is PX, its content will be automatically wrapped in PX. If the end of the line has a long English word (congratulation, etc ), it truncates the word and converts it to the backend part of the row whose end is conra (congratulation) and the next row is tulation (conguatulation.

2. word-wrap: the break-word example is the same as above, but the difference is that it regards the entire word congratulation as a whole. If the end width of the row is insufficient, it automatically puts the entire word in the next line, instead of truncating the word.

3. word-break; break-all supports version: IE5 or above, which 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 suitable for Asian texts that contain non-Asian texts. WORD-WRAP: break-word supported version: IE5.5 and above will be wrapped in the boundary. If necessary, the line feed (word-break) also occurs. Automatic table line breaks to avoid opening. Word-break: normal | break-all | keep-all parameter: normal: according to the text rules of the Asian and non-Asian languages, break-all can be entered in the word: 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 suitable for Asian text keep-all that contains some non-Asian text: it is the same as normal in all non-Asian languages. Chinese, Korean, and Japanese cannot be disconnected. It is applicable to non-Asian text syntax that contains a small amount of Asian text: word-wrap: normal | break-word parameter: normal: allows the content to open the specified container boundary break-word: the content will wrap in the boundary. If necessary, word-break also indicates whether to disconnect or retrieve the line break when the line breaks beyond the boundary of the specified container.

The corresponding script feature is wordWrap. For more information, see my other bibliography. Syntax: table-layout: auto | fixed parameter: auto: Default automatic algorithm. The layout is based on the content of each cell. The table is displayed only after each cell is read and computed. Slow fixed: fixed Layout Algorithm. In this algorithm, the horizontal layout is based only on the table width, the table Border width, the cell spacing, and the column width, but it has nothing to do with the table content: sets or retrieves the Layout Algorithm of a table. The corresponding script feature is tableLayout.



Example:

.word_break {float:left;width:200px;margin:10px;padding:10px;font-size:16px;font-family:simsun;border:1px solid #242424;zoom:1;word-break:break-all;}


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.