当前位置:首页 >> 网页制作

css实现不再让内容把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>