Overflow text with "..." instead

Source: Internet
Author: User

Before always try to use but always out of effect, today write code and use this, found that they used the wrong place, (⊙﹏⊙) b .....

First on the correct code

1 <!DOCTYPE HTML>2 <HTML>3 <Head>4     <MetaCharSet= "Utf-8">5     <title>Text-overflow:ellipsis;</title>6 </Head>7 <style>8 . Text-overflow{9 Display:Inline-block;Ten White-space:nowrap; One Overflow:Hidden; A Text-overflow:ellipsis; -     } - a{ the width:110px;     -     } - </style> - <Body> + <ahref="#"class= "Text-overflow">Test text can be intercepted</a><BR> - <bclass= "Text-overflow"style= "width:100px;">Test text can be intercepted</b> + </Body> A </HTML>

Today is the overflow text in the News list with "..." instead, the first time found that they have CSS style written to the UL tag, and later found to be written into the Li tag can not be used, the last change to a tag on it, the original role is the internal a tag, really sloppy

The HTML styles to write are:

<ul><li><a> I am content </a></li></ul>

Overflow text with "..." instead

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.