原生表格纵向滚动条
<!doctype html>标签:原生,表格,tbody,表头,滚动条,内容 From: https://blog.51cto.com/u_15920212/5962848
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!--原生表格纵向滚动条-->
<style> td, th {
width: 1%; /*平均单元格宽度*/
}
tbody {
overflow-y: auto;
}
thead, tbody {
display: block;
}
table, tbody {
height: 100px; /*正文表格高度*/
}</style>
<title>原生表格纵向滚动条</title>
</head>
<body>
<table>
<thead>
<tr>
<td>表头1</td>
<td>表头2</td>
</tr>
</thead>
<tbody>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
</tr>
</tbody>
</table>
</body>
</html>