table中td内容过长 省略号显示
首先设置 css样式:
table { table-layout: fixed;}
td样式:
td{
white-space: nowrap; /*文本不会换行,在同一行显示*/
overflow: hidden; /*超出隐藏 */
text-overflow: ellipsis; /*省略号显示*/
-o-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
}
td文字悬浮提示是用title:
<td style="width:*;text-align: left;" title="程度上飞">不是都法律手段看</td>