When we are in the row and column, we often see a line of text exceeding the width, and many people use it.
Overflow: hidden hides out-of-the-box content.CodeWhen the text exceeds the limit, what is the ellipsis?
The answer is yes
Use: white-space: nowrap; text-overflow: ellipsis;-o-text-overflow: ellipsis;
Code Demonstration:
Code
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< Html Xmlns = "Http://www.w3.org/1999/xhtml" >
< Head >
< Meta HTTP-equiv = "Content-Type" Content = "Text/html; charset = gb2312" />
< Title > Design Source </ Title >
< Style >
Div. wid { Width : 200px ; White-space : Nowrap ; Text-Overflow : Ellipsis ; -O-text-Overflow : Ellipsis ; Overflow : Hidden ; }
</ Style >
</ Head >
< Body >
< Div Class = "Wid" > < A Href = "Http://www.websjy.com/bbs/forumdisplay.php? FID = 9" Target = "_ Blank" > Examples of CSS code that prevents table and Div from being stretched and deformed </ A > </ Div >
</ Body >
</ Html >