What to do with CSS overflow and line wrapping

Source: Internet
Author: User
First, overflow processing

1, processing blank

If the text is too long to display in the container, do you want to wrap it?

Property:white-space:normal/nowrap

Normal: use browser default settings

NoWrap: No Line break

2. Text Overflow

After overflow processing , If you want to hide the overflow content, you can consider the use of this property.

Note: This property must be associated with Overflow:hidden

Property : Text-overflow

Value :

1,clip , cut, waist truncation

2,ellipsis, through ... (ellipsis) to indicate what is not displayed

For example:

    1. <! DOCTYPE HTML >

Two , line change

Note: only valid in English

1.Long Word wrapping

Word-wrap:

Normal: default, the browser default form, do not break the word structure

Break-word: Breaking the structure of words

2.Text Wrapping

Word-break:

Value:

Normal

Break-all: breaking word structure for line breaks

Keep-all: line wrapping under a space in the half-width state

<!        DOCTYPE HTML >
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.