1:给 table 加上 table-layout:fixed 属性
2: 给 td 加上 width属性
<html>
<body>
<style>
.mytable {
table-layout:fixed
}
</style>
<table class = "mytable" border="1" >
<tr>
<th width="300px">Month</th>
</tr>
<tr>
<td width="300px">Januarydffffffffdaf</td>
</tr>
</table>
</body>
</html>
但是比如,我们把width 改为 10,可以看到表格宽度不再减少:
也就是说,默认长度至少为单元格内容长度(不换行)。