In css3, word-wrap is allowed in the word and how to deal with the word-break, css3word-wrap

Source: Internet
Author: User

In css3, word-wrap is allowed in the word and how to deal with the word-break, css3word-wrap

First, let's talk about the default behavior of the browser. When a long word is too long to exceed its region, it is first moved to the next line.

1. word-wrap: break-word

In the w3school manual, long words or URL addresses are allowed to wrap to the next line. That is to say, when the length of a word exceeds its region, the browser moves the extra characters to the next line.

This attribute only allows the browser to wrap long words first, because when the length of a word is too long, the browser first moves it to the next line by default. If this attribute is set, long words are truncated.

2. The word-break: break-all attribute specifies the processing method of the automatic line feed.

It means that the truncation is truncated when any part of the line exceeds the region. If this attribute is not added, the browser will first move it down by default,

After setting the word-break: break-all attribute, perform Truncation in the current row.

 

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.