【问题标题】:How to remove vertical scrolling on data table bootstrap?如何删除数据表引导程序上的垂直滚动?
【发布时间】:2018-09-09 16:48:38
【问题描述】:

我正在使用 while 循环从数据库中获取一些数据,但是 当我的数据表中有很多条目时,会显示此滚动条:

screen shot

我尝试过的:

#mytable::-webkit-scrollbar {
    display: none;
}

和:

.table .table-bordered .table-striped  {

    overflow-x: hidden;
    overflow-y: hidden;
}

我正在使用 bootstrap 3 模板

我的代码:

<table id="rip"class="table table-bordered table-striped js-dataTable-full-pagination">

<thead>

<tr>
<th><input id="selectAllboxes" type="checkbox">

<th>cc num</th>
<th>cc</th>
<th>student name</th>
<th>com date</th>
<th>stats</th>
<th>Edit</th>
<th>Print</th>


</tr>
</thead>
<tbody>




   echo "<tr>";
   ?>
  <th><input class='checkboxes' type='checkbox' name='checkBoxArray[]' value='<?php echo $cert_id; ?>'></th>

   <?php
   echo "<td>{$cert_id}</td>";
   echo "<td>{$course_title}</td>";
   echo "<td>{$name_student}</td>";
   echo "<td>{$date_com}</td>";
 echo "<td>$status</td>";

echo"<td>

<a  href='' target='_blank'><i class='fa fa-print fa-2x'></i></a></a>
</td>




";

echo "<td><a href=''><i class='fa fa-edit fa-2x'></i></a></td>";

echo "</tr>";
      }
?>

</tbody>
</table>

到目前为止,我已经尝试过没有任何效果。

知道如何删除滚动条吗?

【问题讨论】:

  • 你能附上你的代码吗?
  • @JonathanChaplin 我已经包含了代码

标签: html css twitter-bootstrap-3 bootstrap-4


【解决方案1】:

在你的 css 中尝试添加:

    body {
        overflow-y:hidden;
    }

正如Bootstrap : how to disable vertical scrollbar?所建议的那样

【讨论】:

    【解决方案2】:

    通过添加解决 滚动Y:假;

    到js文件

    【讨论】:

      猜你喜欢
      • 2017-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-08
      • 2017-11-30
      • 2017-02-13
      相关资源
      最近更新 更多