原生html table固定高度并显示滚动条

.class  table tbody {
        display: block;
        max-height: 200px;
        overflow-y: scroll;
    } 
   .class table thead,
    .class tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
   .class table thead {
                 width: calc( 100% - 1em)
            }
<table  class="table table-striped table-bordered table-hover" style="width:40%;height:100px;overflow: auto;">
            <thead>
                <tr>
                <th class="tableth"><span translate="filed">span>th>
            tr>
            thead>
            <tbody >
                 
            tbody>
        table>

你可能感兴趣的:(html,前端)