1

我正在使用创意 tim https://demos.creative-tim.com/argon-dashboard/的氩仪表板。现在我希望表格标题在滚动页面时保持在顶部。我尝试使用类sticky-top,但它不起作用。

                           <thead class="thead-light sticky-top">
                            <tr>
                                <th scope="col-2" class="sort" data-sort="name">Customer ID</th>
                                <th scope="col" class="sort" data-sort="budget">Company</th>
                                <th scope="col" class="sort" data-sort="status">Employees</th>
                                <th scope="col">Country</th>
                                <th scope="col" class="sort" data-sort="completion">Last admin login</th>
                                <th scope="col">Last employee login</th>
                                <th scope="col">Last invoice</th>
                                <th scope="col">Next invoice</th>
                                <th scope="col">Total invoiced</th>
                                <th scope="col">Status</th>
                                <th scope="col">Created</th>
                            </tr>
                            </thead>

代码有什么问题?任何人都可以做到这一点,请在下面评论。

在此处输入图像描述

4

1 回答 1

1

试试fixed-top吧。它对我有用

于 2021-08-25T08:36:28.090 回答