【问题标题】:How to add horizontal scrollbar to bootstrap-table?如何将水平滚动条添加到引导表?
【发布时间】:2022-01-07 05:45:19
【问题描述】:

我在引导表中遇到问题,其中我的列不适合屏幕,所以我想通过在引导表中提供水平滚动条来处理它。

【问题讨论】:

    标签: javascript jquery frontend bootstrap-table


    【解决方案1】:

    您可以使用引导程序提供的类来实现这一点,

    <div>
    <div class="table-responsive">
      <table class="table table-striped table-bordered" style="width: 800px;">
        <tr>-</tr>
       </table>
    </div>
    

    【讨论】:

    • 不工作,水平滚动不可见,有什么办法可以显示水平滚动条
    【解决方案2】:

    您可以添加类“.table-responsive”

    <div class="table-responsive">
      <table class="table">
        ...
      </table>
    </div>
    

    参考: https://getbootstrap.com/docs/4.1/content/tables/

    【讨论】:

    • 不工作,水平滚动不可见,有什么办法可以显示水平滚动条
    • 应该可以了,类中包含“overflow-x:auto”,确保table的宽度大于“.table-responsive”。
    猜你喜欢
    • 2021-09-11
    • 2016-08-09
    • 1970-01-01
    • 2016-09-09
    • 2018-06-20
    • 2016-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多