gpt4 book ai didi

html - Bootstrap 响应式表格水平滚动始终可见

转载 作者:搜寻专家 更新时间:2023-10-31 19:29:36 26 4
gpt4 key购买 nike

我在 .net 网络应用程序中使用响应式 Bootstrap 表来显示信息。每当返回大量信息时,页面底部会出现水平滚动条。结果,用户必须滚动到底部才能访问水平滚动条以查看当前未显示在屏幕上的信息。我想强制水平滚动条始终可见。我试图将“Position:absolute”添加到表格 div 标签,但它似乎会干扰响应格式。有什么办法可以在使用响应式表格时始终显示水平滚动条吗?

<div id="divGridResults" style="overflow-x: scroll;" runat="server">
<div class="table-responsive;text-center; ">
<asp:GridView ID="gvEmployee" runat="server" Width="100%" AutoGenerateColumns="False"
ClientIDMode="Static" CssClass="table table-striped table-hover table-condensed "
AllowSorting="True" PagerStyle-CssClass="bs-pagination">
<Columns>
<asp:BoundField DataField="Emp_ID" HeaderText="ID" SortExpression="EMP_ID" />
<asp:BoundField DataField="First_Name" HeaderText="First Name" SortExpression="First_Name" />
<asp:BoundField DataField="Last_Name" HeaderText="Last Name" SortExpression="Last_Name" />
<asp:BoundField DataField="Manager" HeaderText="Manager" SortExpression="Manager" />
<asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" />
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
<asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
<asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
<asp:BoundField DataField="Dept" HeaderText="Department" SortExpression="Dept" />
</Columns>
<PagerSettings NextPageText="Next" PreviousPageText="Back" Mode="NumericFirstLast " />
<PagerStyle CssClass="bs-pagination" />
</asp:GridView>
</div>
</div>

最佳答案

覆盖表格响应式CSS

.table-responsive{
overflow-x: auto !important;
}

关于html - Bootstrap 响应式表格水平滚动始终可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50534898/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com