Php Chinese and English output line feed

Source: Internet
Author: User
& Nbsp; When outputting Chinese characters on the page, if the area width is insufficient, the line breaks automatically. However, English letters are not allowed. that is to say, the output is similar to & quot; aaaaaaaaaaaa & quot; A string of characters. the page regards this as a word and cannot be disconnected. if it is output in & lt; divid & quot; test & quot; & gt; & lt; div & gt, the area is only 3 characters in width, so the page will be misplaced. If you change to & when the page outputs Chinese characters, if the area width is insufficient, the line breaks automatically. However, English letters are not allowed. that is to say, you output a string of characters similar to "aaaaaaaaaaaa, the page considers this as a word and cannot be disconnected.

And the area is only 3 characters in width, the page will be misplaced. If you change to "aaa", you can use a line break because the page regards them as four words.

To forcibly wrap a line, you only need to add word-wrap: break-word to the CSS design;/* forcibly wrap */.

# Test {

......;

......;

Word-wrap: break-word;/* Force line feed */

}

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.