html页面
<div id="toolListDiv">
<table id="toolListTable">
<thead>
<tr>
<th>序号</th>
<th>工具</th>
<th>动能</th>
<th>功能</th>
<th>时间</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
设置样式
/** div */
#toolListDiv{position: absolute;top:50%;width:50%;height:28%;}
/** 表格 */
#toolListTable{top: 25%;left: 1%;width: 97%;font-size: 14px;position: absolute;height:75%;}
/** 表头 width: calc( 100% - 1em )*/
#toolListTable thead{color:#2ae3fb;width: calc( 100% - 1em )}
/** tbody overflow-y: auto;display: block;height:80%; **/
#toolListTable tbody{color:#96a0b8;overflow-y: auto;display: block;height:80%;}
/** display:table;width:100%;table-layout:fixed; */
table thead, tbody tr {display:table;width:100%;table-layout:fixed;}
滚动条美化
/** 滚动条 */
::-webkit-scrollbar {width: 0.7%;}
::-webkit-scrollbar-thumb{background: #2ae3fb;min-height: 1%;border-radius: 10px;opacity: 0.6%;}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);border-radius: 10px;/*滚动条的背景区域的圆角*/background-color: transparent;/*滚动条的背景颜色*/}
::-webkit-scrollbar-thumb:vertical:hover{background: #82fbf8;}
::-webkit-scrollbar-thumb:horizontal:hover{background: #82fbf8;}
::-webkit-scrollbar 滚动条整体部分
::-webkit-scrollbar-thumb 滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条)
::-webkit-scrollbar-track 滚动条的轨道(里面装有Thumb)
::-webkit-scrollbar-button 滚动条的轨道的两端按钮,允许通过点击微调小方块的位置。
::-webkit-scrollbar-track-piece 内层轨道,滚动条中间部分(除去)
::-webkit-scrollbar-corner 边角,即两个滚动条的交汇处
::-webkit-resizer 两个滚动条的交汇处上用于通过拖动调整元素大小的小控件