css-the ellipsis after the text is out of view

Source: Internet
Author: User

1, if it is a single line of text:

Overflow:hidden;text-overflow:ellipsis;white-space:nowrap;

2, if it is multi-line text, the text box height is set to a multiple of the text line, and then after the text to build a content for the "..." width of 1em and set the text background color of after pseudo-class, relative to the text box set absolute position is the bottom 0 right 0, which can be visually achieved the same ellipsis effect.

3, or create a new element directly after the text box, such as

The bottom right corner shows the details, and is a link, you can create a new link, and then absolute position 0 bottom 0, remember to set the background color.

There are other big ways on the Internet to continue learning.

css-the ellipsis after the text is out of view

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.