我有一个固定宽度为400px的div。 div内有一张大于400px的表格,所以我想让div滚动。这工作正常。但我不能改变单元格的宽度。我需要单元格2是200px宽。HTML固定宽度表,列不会调整大小
<div style='width:400px;overflow:scroll'>
<table style='border:1px solid black'>
<th>field1</th>
<th style='width:200px'>field2</th>
<th>field3</th>
<th>field4</th>
<th>field5</th>
<th>field6</th>
<th>field7</th>
<th>field8</th>
<th>field9</th>
<th>field10</th>
<th>field11</th>
<th>field12</th>
<th>field13</th>
<th>field14</th>
<th>field15</th>
</table>
</div>
它在你的细胞中防止其小大小的文本。 – Kobbe