响应式数据表不会折叠列

时间:2018-06-18 19:22:38

标签: datatable datatables responsive

------->Picture dataTable responsive error

我正在使用https://datatables.net/的datatTable,这个链接和脚本,我正在使用jquery和bootstrap4

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.18/css/jquery.dataTables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js"></script>

它在电脑屏幕上工作正常但不适用于手机屏幕

<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.18/css/jquery.dataTables.min.css"/>
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
*****
<div class="container">
      <div class="row">
        <div  id="textH4D"class="col-12">
          <h4 id="h4D">Devices</h4>
        </div>
        <div id="tablaDevices"class="col-12">
          <table id="table_id" class="display">
              <thead>
                  <tr>
                      <th>Column 1</th>
                      <th>Column 2</th>
                      <th>Column 3</th>
                      <th>Column 4</th>
                      <th>Column 5</th>


       </tr>
                  </thead>
                  <tbody>
                      <tr>
                          <td>Row 1 Data 1</td>
                          <td>Row 1 Data 2</td>
                          <td>Row 1 Data 3</td>
                          <td>Row 1 Data 4</td>
                          <td>Row 1 Data 5</td>
                      </tr>
                      <tr>
                          <td>Row 2 Data 1</td>
                          <td>Row 2 Data 2</td>
                          <td>Row 2 Data 3</td>
                          <td>Row 2 Data 4</td>
                          <td>Row 2 Data 5</td>
                      </tr>

                  </tbody>
              </table>
            </div>
          </div>
        </div>
    <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.0.min.js"><\/script>')</script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
   <script type="text/javascript" src="https://cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js"></script>
    <script src="js/vendor/bootstrap.js"></script>

我需要帮助

0 个答案:

没有答案