CSS
tr {
width: 100%;
display: inline-table;
height:60px;
table-layout: fixed;
}
table{
height:300px;
display: -moz-groupbox;
}
tbody{
overflow-y: scroll;
height: 200px;
width: 100%;
position: absolute;
}
HTML
<table class="table table-striped">
<thead>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
</tr>
<tr>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
</tr>
<tr>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
</tr>
<tr>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
</tr>
<tr>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
<td>Some data..</td>
</tr>
試試這個..
來源
2016-09-22 09:59:46
vas
必須使用DIV CLASS = 「表響應」 得到它完全負責,你可以使用table class =「table」裏面,查de文檔: http://www.w3schools.com/boots陷阱/ bootstrap_ref_css_tables.asp – JoelBonetR