css--several properties related to line break White-space Word-wrap Word-break

Source: Internet
Author: User

Today encountered a problem, the table inside the contents of all replaced this line, in the TD add attribute Word-break:break-all can.

Compare several line-wrapping related properties and make a summary:

White-space:normal natural display, that is, text is automatically wrapped after touching the container wall.

White-space:nowrap force text on the same line unless you encounter </br>

Word-wrap:break-word

It naturally shows that the next long word will move to the next line, and if the word grows over the width of the container it will reach out. The effect of Word-wrap:break-word is that the long word will still move to the next line, but will not let it go beyond the container's width, but let it break after a row.

Word-break:break-all

Its magical role is that the long word will not move to the next line of display, and the same as the short word is displayed, on the basis of the container wall and then fold the line.

Thank http://www.cnblogs.com/2050/archive/2012/08/10/2632256.html for the detailed explanation!

css--several properties related to line break White-space Word-wrap Word-break

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.