CSS3 text is out of bounds after an ellipsis appears

Source: Internet
Author: User

Clip: When inline content overflows the block container, the overflow is trimmed off.

Ellipsis: When inline content overflows the block container, replace the overflow part with the (... )。

When the block container < ' overflow '> < ' text-overflow ' > attribute is in effect, the block container must explicitly define < ' overflow ' > as a non-visible value, while explicitly or implicitly defined &L t; ' width ' > is a non-auto value, < ' White-space ' > is a nowrap value.
We will text-overflow the necessary 3 properties: < ' overflow ' >, < ' width ' > and < ' white-space ' > are defined directly on the parent block container of the inline content
 <! DOCTYPE html>.test Li{margin -top:10px;}. Test. Clip p{overflow:hidden;width:200px;white -space:nowrap;text-overflow: Clip;}. Test. Ellipsis p{overflow:hidden;width:200px;white -space:nowrap;text- overflow:ellipsis;}  </style>

Original source: http://gucong3000.github.io/css-book/properties/user-interface/text-overflow.htm

CSS3 text is out of bounds after an ellipsis appears

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.