Bootstrap-table, overflow

前提是你 提交于 2019-12-12 04:39:17

问题


I've tried Bootstrap-table (http://bootstrap-table.wenzhixin.net.cn/), for filtering and pagination.

Works fine, but when I put a dropdown in the table you have to scroll to show it.

<table id="ex" class="table table-striped table-condensed table-hover">
  <thead class="thead-inverse">
    <tr>
      <th></th>
      <th>Date</th>
      <th>Customer</th>
      <th>Amount</th>
      <th>Status</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>#
      </td>
      <td>
        <nobr>2015-03-03</nobr>
      </td>
      <td>Test</td>
      <td>
        <nobr>8 000,00</nobr>
      </td>
      <td>OK</td>
    </tr>
    <tr>
      <td>#</td>
      <td>2015-03-04</td>
      <td>Test</td>
      <td>433,33</td>
      <td>OK</td>
    </tr>
    <tr>
      <td>
        <div class="btn-group">
          <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        Action
        <span class="caret"></span>
    </a>
          <ul class="dropdown-menu">
            <li>First menu item</li>
            <li>Second menu item</li>
          </ul>
        </div>
      </td>
      <td>2015-03-06</td>
      <td>Test</td>
      <td>33,12</td>
      <td>OK</td>
    </tr>
  </tbody>
</table>

https://jsfiddle.net/qr3ao2e3/

Do you have any solutions?


回答1:


The .fixed-table-body class has the overflow X and Y properties set to auto which means:

auto - Should cause a scrolling mechanism to be provided for overflowing boxes

This fixes it

.fixed-table-body {
    overflow-x: visible;
    overflow-y: visible;
    height: 100%;
}

See your updated fiddle here. Hope that helps.



来源:https://stackoverflow.com/questions/34819911/bootstrap-table-overflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!