CSS is compatible with Firefox by displaying excess parts as ellipsis

Source: Internet
Author: User

<! Doctype HTML public "-// W3C // dtd html 4.01 // en" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" C>
<Title> CSS shows the excess part as a ellipsis. This method is compatible with Firefox _ script house _ www.jb51.net. </title>
<Style>
* {Margin: 0; padding: 0 ;}
A {text-Decoration: none; color: #000 ;}
A: hover {text-Decoration: none; color: #000 ;}
Ul {
Width: 300px;
Margin: 40px auto;
Padding: 12px 4px 12px 24px;
Border: 1px solid # d4d4d4;
Background: # f1f1f1;
}
Li {margin: 12px 0 ;}
Li {
Display: block;
Width: 80px;
Overflow: hidden;/* do not write it at the end */
White-space: nowrap;
-O-text-overflow: ellipsis;
Text-overflow: ellipsis;
}
/* Firefox only */
Li: Not (p ){
Clear: both;
}
Li: Not (p) {
Max-width: 170px;
Float: left;
}
Li: not (P): After {
Content :"...";
Float: left;
Width: 25px;
Padding-left: 5px;
Color: #000;
}
</Style>
</Head>
<Body>
<Ul>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
<Li> <a href = "#"> technical space of suntear </a> </LI>
</Ul>
</Body>
</Html>
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.