html 标题太长,使其后边用省略号代替

<!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>
  <title> new document </title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
 </head>

 <body>
<p style="overflow: hidden; 
text-overflow: ellipsis; 
width: 150px;
white-space:nowrap;">
简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文
</p>
<p>关键在于:text-overflow: ellipsis;<br>

这种方式支持IE6+,Chrome浏览器,切记要和overview:hidden; white-space: nowrap;一起使用。</p>
 </body>
</html>
posted @ 2012-10-30 16:08  杰丫头  阅读(594)  评论(0编辑  收藏  举报