CSS text overflow display ellipsis

Source: Internet
Author: User

<! DOCTYPE html>


<meta charset= "UTF-8" >
<TITLE>HTML5 label </title>
<style>
p{
/**
White-space:nowrap; Indicates that the text will not wrap, continue on the same line, until the <br> tag is encountered;
Overflow:hidden; Do not display more than the object size of the content, is to put out the part of the hidden;
text-overflow:ellipsis; When the text object overflow is displayed ... and of course, the Set property is not displayed for clip point points;
-o-text-overflow: To be compatible with opera browser;
*/
width:200px;
Overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
White-space:nowrap;
}
div{
/ * Text exceeds height not displayed * /
Overflow:hidden;
Display:block;
height:60px;
width:100px;
}
</style>

<body>
<p> This process is more friendly to search engines, because the title is not actually truncated, but is limited to the width and is not displayed. </p>
<div> This process is more friendly to search engines, because the title is not actually truncated, but is limited to the width and is not displayed. </div>
</body>

CSS text overflow display ellipsis

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.