Cssword-break: break-all and word-wrap: break-word can automatically wrap the content of a container such as DIV. However, there is a difference between the two. This article introduces the difference between css automatic line feed word-break: break-all and word-wrap: break-word to the coders.
1. word-break: break-all, for example, if the width of p is PX, its content will wrap to PX automatically. If the end of the line has a long English word (such as congratulation ), 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. Suggestion: If word-break is detected by 3C, a problem will be displayed, which may lead to Baidu snapshots.-The opera firefox browser does not support the word-break attribute and can use white-space: normal; in this way, both FireFox and IE can get the correct line feed, and note that spaces between words cannot be replaced, otherwise the line feed cannot be correct. I tried it on my website and it does not support it. You can try again by W3C.