当前位置: 代码迷 >> Web前端 >> 报表中长度太长,显示在一行多余长度不显示或显示为省略号
  详细解决方案

报表中长度太长,显示在一行多余长度不显示或显示为省略号

热度:178   发布时间:2012-10-31 14:37:32.0
表格中长度太长,显示在一行多余长度不显示或显示为省略号

使用范例

<HTML> 
<BODY> 
<DIV   STYLE= "text-decoration:underline;color:darkRed; 
font:   bold   20px   Arial;font-weight:bold "> 
Effect   of   CSS   property   <I> text-overflow </I> </DIV> 
<DIV   STYLE= "font:   bold   16px   Arial;   color:darkRed;   font-weight:bold "> 
Each   box   (DIV   element)   below   contains   the   following   text: </DIV> 
<DIV   > We   hold   these   truths   to   be   self-evident, 
that   all   people   are   created   equal. </DIV> 
<DIV   STYLE= "font:   bold   16px   Arial;color:darkRed;   font-weight:bold "> 
Note   how   the   STYLE   settings   effect   the   rendering   of   the   text </DIV> 
<DIV   STYLE= "position:   relative;   height:   75px;   top:10 "> 
<DIV   STYLE= "position:   absolute;   left:   10px; 
font:   bold   16px   Arial,   sans-serif;   color:   blue;   "> 
STYLE   = "text-overflow   :   clip;   overflow   :   hidden " 
<DIV   STYLE= "position:   absolute;   left:   0px;   top:   18px;   color:   black; 
width:   120px;   height:   50px;   border:   1px   solid   blue; 
font:   14px   Times   New   Roman,   serif;   overflow:   hidden; 
text-overflow:clip "> 
<NOBR> We   hold   these   truths   to   be   self-evident, 
that   all   people   are   created   equal. </NOBR> 
</DIV> 
</DIV> 
<DIV   STYLE= "position:   relative;   height:   75px;   top:   70 "> 
<DIV   STYLE= "position:   absolute;   left:   10px; 
font:   bold   16px   Arial,   sans-serif;   color:   blue;   "> 
STYLE   = "text-overflow   :   ellipsis;   overflow   :   hidden " 
<DIV   STYLE= "position:   absolute;   left:   0px;   top:   18px;   color:   black; 
width:   120px;   height:   50px;   border:   1px   solid   blue; 
font:   14px   Times   New   Roman,   serif;   overflow:   hidden; 
text-overflow:ellipsis "> 
<NOBR> We   hold   these   truths   to   be   self-evident, 
that   all   people   are   created   equal. </NOBR> 
</DIV> 
</DIV> 
<DIV   STYLE= "position:   relative;   height:   75px;   top:70 "> 
<DIV   STYLE= "position:   absolute;   left:   10px; 
font:   bold   16px   Arial,   sans-serif;   color:   blue;   "> 
STYLE   = "text-overflow   :   ellipsis;   overflow   :   visible " 
<DIV   STYLE= "position:   absolute;   left:   0px;   top:   18px;   color:   black; 
width:   120px;   height:   50px;   border:   1px   solid   blue; 
font:   14px   Times   New   Roman,   serif;   overflow:   visible; 
text-overflow:ellipsis "> 
<NOBR> We   hold   these   truths   to   be   self-evident, 
that   all   people   are   created   equal. </NOBR> 
</DIV> 
</DIV> 
</BODY> 
</HTML> 

?

  相关解决方案