Use CSS to solve the title display the number of words beyond the ellipsis instead of the method

Source: Internet
Author: User
Title words beyond the scene:

The left side of the column I can't let him change the line, how to do?

Step One: hide content beyond the width

Step two: show ellipsis (...) when text overflows inside an object

Here is the workaround:

table{width:100px;table-layout:fixed;/* only the table-defined layout algorithm is fixed, the following TD definition will work. */}td{width:100%;word-break:keep-all;/* does not break the line */white-space:nowrap;/* the content is not wrapped */overflow:hidden;/* the content exceeds the width of the contents of the hidden part */ text-overflow:ellipsis;/* display ellipsis (...) when text inside an object overflows; use with overflow:hidden; */

"Recommended"

1. HTML text control display the number of words beyond the use of ellipsis method

2. CSS to resolve the text number of words beyond the display ellipsis ... Method (Single-line, multi-text)

3. Online CSS free video tutorial

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.