CSS control Li line character overflow with ellipsis instead of

Source: Internet
Author: User

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" mrc= "text/html; Charset=utf-8 "/>
<title>css control line character overflow with ellipsis instead of </title>
<style>
* {margin:0; padding:0;}
a {text-decoration:none; color: #000;}
a:hover {text-decoration:none; color: #000;}
UL {width:280px;height:126px; margin:38px auto;padding:12px 6px 12px 22px;border:1px solid #CCC; background: #EEE;}
Li {margin:12px 0;}
Li a {display:block;width:168px;overflow:hidden;/* cannot be written in the last */white-space:nowrap;-o-text-overflow:ellipsis; Text-overflow:ellipsis;}
/* Firefox only */
Li:not (p) {Clear:both;}
Li:not (P) a {max-width:172px;float:left;}
Li:not (P): after {MRC: "..."; Float:left;width:25px;padding-left:5px;color: #000;}
</style>


<body>
<ul>
<li><a href= "/soft/3149.shtml" target= "_blank" > Display content 1, display content 1, display content 1, display content 1</a></li><li ><a href= "/soft/3148.shtml" target= "_blank" > Display content 2, display content 2, display content 2,


Display content 2</a></li><li><a href= "/soft/3147.shtml" target= "_blank" > Display content 3, display content 3, display content 3, display content 3< /a></li><li><a href= "/soft/3144.shtml" target= "_blank" > Display content 4,


displaying content 4, displaying content 4, displaying content 4, displaying content 4</a></li>
</ul>
<div>http://www.999jiujiu.com/</div>
</body>

CSS control Li line character overflow with ellipsis instead of

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.