让table中的td不会被过长的文字撑开,并且自动出现省略号

<style type="text/css">
table {width:600px;table-layout:fixed;}
td
{white-space:nowrap;overflow:hidden;word-break:keep-all;text-overflow:ellipsis}

</style>
<table border=1 >
<tr>
<td
width="30%">dd</td>

<td>ddddddddddddddddddddddddddddddfsljdflsajufiajklsjadflkjsalkfdjdsklajdflksajflksajfdlkdsjdflksjfjldskajdflksajflskajf</td>

<td width="30%">dd</td>
</tr>
</table>

posted @ 2015-01-14 10:56  魏巍(QQ:68235081)  阅读(940)  评论(0编辑  收藏  举报