网页上标题过长时省略号显示

 <!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=UTF-8" />
<title>无标题文档</title>
</head>
<style>

/* 省略号*/ 
.ssh{
width:100px;/*容器的基本定义*/
height:auto;
}
  /* IE下的样式 */
p span{
display: block;
width:100px;/*对宽度的定义,根据情况修改*/
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}/* FF 下的样式 */
p{clear:both;}
p:after{
content:"";
}
</style>
<body>
<table width="100%" border="1">
  <tr>
    <td width="20%">&nbsp;</td>
    <td width="24%">&nbsp;</td>
    <td width="56%">&nbsp;</td>
  </tr>
  <tr>
    <td class="ssh"  title="江西高安数十人街头斗殴对砍"><p><span>江西高安数十人街头斗殴对砍</span></p></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

你可能感兴趣的:(标题;省略号)