CSS3 Let text wrap--word-break property

Source: Internet
Author: User
Tags word wrap

1. Make text wrap by browser

The browser itself comes with the ability to wrap text in its own line.

2. Specify how the line wrap is handled

In CSS3, you can use the Word-break property to decide for yourself how to handle the wrap.

div{

Word-break:break-all;

}

The value that the Word-break property can use
Value Line break rules IE5 or more Safari and Chrome
Normal Use browser default line-wrapping rules Support Support
Keep-all Wrap only in half-width spaces or hyphens Support Not supported
Break-all Allow line wrapping within a word Support Support

When the Word-break property uses the Break-all parameter value, the word wrap is allowed for Western text. For punctuation marks, when the Word-break attribute uses the Break-all parameter value, in Safari and chrome, punctuation is allowed at the beginning of the line, and the punctuation mark is still not allowed at the beginning of the line.

CSS3 Let text wrap--word-break properties

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.