About the CSS3 text wrapping method

Source: Internet
Author: User

One

Currently available for Mainstream support:

Text-overflow mainly resolves text overflow,

Value:clip[Default] | ellipsis | String (only Firefox is supported)

cooperate with White-space:nowrap; Overflow:hidden use


Two

Word-wrap

Value: normal [default] | Break-word

--Long Word line change


Word-break

Value: normal [default] | Break-all | Keep-all

-- non-CJK ("CJK") script break rules


Break-all Allows line wrapping within a word.
Keep-all You can only wrap at half-width spaces or hyphens.


Emphasis: The following commonly used three differences

By default: ① the end of the word: another line,

② long Word length and continuous letter: not broken

③ long word with dash: Conservative break


word-wrap:break-word  Span style= "font-size:20px;font-family: ' Microsoft Jas Black ', ' Microsoft Yahei '; Color:rgb (255,0,0);" > change ]


word-break:keep-all       Long words are too long and with dashes: do not break [  ] change ③ ]

word-break:break-all       the end of the word does not fit          : match broken Span style= "font-size:20px;font-family: ' Microsoft Jas Black ', ' Microsoft Yahei '; Color:rgb (255,0,0);" > change ]

                                             long Word is long and the letter is continuous: match break [ change ② ]

                                                         Long word too long with dash: Match break [  change ]


A conservative break is broken in a certain format, and a break is a break without leaving any boundary blanks.



This article from the "front-end Development Study Notes" blog, declined reprint!

About the CSS3 text wrapping method

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.