css: scroll-table

.scroll-table {
    table tbody {
        display: block;
        max-height: 120px;
        overflow-y: scroll;
    }
    table thead,tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    table thead {
        width: calc(100%-1em);
    }
}
原文地址:https://www.cnblogs.com/Nyan-Workflow-FC/p/11115072.html