css - 如何制作具有很多字段的响应表

标签 css twitter-bootstrap responsive-design

我尝试使用此表制作带有 Bootstrap 的响应表:

<table class="table table-striped table-bordered table-hover" id="dataTables-dokumen">
  <thead>
    <tr>
      <th>No</th>
      <th>Pertanyaan 1</th>
      <th>Pertanyaan 2</th>
      <th>Pertanyaan 3</th>
      <th>Pertanyaan 4</th>
      <th>Pertanyaan 5</th>
      <th>Pertanyaan 6</th>
      <th>Pertanyaan 7</th>
      <th>Pertanyaan 8</th>
      <th>Pertanyaan 9</th>
      <th>Pertanyaan 10</th>
      <th>Pertanyaan 11</th>
      <th>Pertanyaan 12</th>
      <th>Pertanyaan 13</th>
      <th>Pertanyaan 14</th>
      <th>Pertanyaan 15</th>
      <th>Pertanyaan 16</th>
      <th>Pertanyaan 17</th>
      <th>Pertanyaan 18</th>
      <th>Pertanyaan 19</th>
      <th>Pertanyaan 20</th>
    </tr>
  </thead>
  <tbody>
    //this is a value of table
  </tbody>
</table>

但是表格总是像这样穿过一条线:Example

如果我们在表格中有很多字段并且我们想制作一个响应式表格,有什么建议吗?

最佳答案

尝试 <table> 中的“table-responsive”类标签。您似乎正在使用数据表和 Bootstrap 。希望表格响应类可以解决您的问题。

关于css - 如何制作具有很多字段的响应表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47621326/

相关文章:

javascript - 移动浏览器中的正文边距问题

javascript - 自动重新加载div容器

javascript - 静态定位的div框问题

javascript - 为什么我的背景图片这么大而且拉长了?

html - 如何在示例中添加 Bootstrap 按钮之间的间距?

css - BootStrap 导航栏侧面按钮未显示

html - <p> 元素的边框不会在 Ipad/Pro 设备中显示为 block 元素

javascript - 构建庞大的应用程序 Assets

javascript - D3(使用 Bootstrap 网格布局)- 工具提示放置已关闭

css - 如何居中裁剪全屏背景图像