css部分:
table{
display: block;height: 200px;
overflow-y: auto;
}
table thead, tbodytr{
display:table;
width:100%;
table-layout:fixed;
}
table thead{
width: calc( 100% - 1.2em )
}
html部分:
<table class="table table-striped table-bordered table-hover dataTables-example" style="table-layout:fixed;word-break: break-all;" >
<thead>
<tr>
<th style="width:3%;padding-left: 8px;padding-right: 8px;vertical-align: top;"></th>
<th style="width: 40%;">名称</th>
<th style="width: 57%;">描述</th>
</tr>
</thead>
<tbody style="height: 200px;overflow-y: scroll;">
<tr>
<td style="width:3%;padding-left: 8px;padding-right: 8px;vertical-align: top;"><input type="radio" name="id"/></td>
<td style="width: 40%;"> 小明</td>
<td style="width: 57%;">正在努力学习</td>
</tr>
</tbody></table>