小编hen*_*hen的帖子

粘性标题后面的内容在可滚动表格中可见

当前的问题看起来是这样的,如图所示,当滚动到标题后面时,内容仍然有点可见。如何解决这个问题并使内容在滚动到粘性标题后面时不可见?

.tableUpdates {
        overflow-y: auto;
        height: 250px;
    }

    .tableUpdates thead th {
        position: sticky;
        margin-top:0px;
        top: 0;
        background: #DC3545;
    }
Run Code Online (Sandbox Code Playgroud)
<div class="col-md-4 pr-0 tableUpdates">
    <table class="table table-bordered table-hover">

           <thead class="bg-danger text-light">
               <tr>
                  <th>Header</th>
               </tr>
            </thead>
            
            <tbody>
               .....some rows
            </tbody>
    </table>
</div>


    
Run Code Online (Sandbox Code Playgroud)

html css html-table scrollable bootstrap-4

10
推荐指数
2
解决办法
8152
查看次数

标签 统计

bootstrap-4 ×1

css ×1

html ×1

html-table ×1

scrollable ×1