CSS intercepts strings, extra text is displayed with ellipses

Source: Internet
Author: User

Recently I know that CSS has such a side of the fried Sky ~ ~ ~

Do a similar forum page, the user avatar 70px, but the user name can not be limited ah, English, Chinese, you say he would like to take a "my name is good, how do you do it", that swaiiow not the egg pain chrysanthemum tight ~ ~

Fortunately, swaiiow in the unfortunate fortunately found the CSS so the side of the fried sky, never know, write to share to everyone

Very simple, big fart not more put, directly open chrysanthemum:

CSS inside the following settings:

a.name{line-height:30px;text-align:center;text-overflow:ellipsis;//let out the use of ... Implement white-space:nowrap;//suppress line break overflow:hidden;//out of hidden Display:block;}

I write the user name with a tag, so I want to display:block it.

Well, it's simple, but it works.

(PS: ie6! not supported )


If you have any advice, please add qq:1740437



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.