html - Twitter Bootstrap 中的响应式表格处理

标签 html twitter-bootstrap css

当表格的宽度超过跨度的宽度时,如本页:http://jsfiddle.net/rcHdC/

您会看到表格的内容在 span 之外。

满足这种情况的最佳方法是什么?

最佳答案

Bootstrap 3现在有开箱即用的响应表。万岁! :)

您可以在这里查看:https://getbootstrap.com/docs/3.3/css/#tables-responsive

添加 <div class="table-responsive">围绕着你的 table ,你应该可以开始了:

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

要使其适用于所有布局,您可以这样做:

.table-responsive
{
    overflow-x: auto;
}

关于html - Twitter Bootstrap 中的响应式表格处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15176714/

相关文章:

javascript - 如何使输入值首字母大写?

html - 响应式设计改变div的顺序和位置

javascript - HTML 和 JavaScript 图像幻灯片仅链接到相同的超链接,而不是每个图像的不同超链接

javascript - 如何混合 PHP 和 Javascript 变量(如果有的话)?

html - 宽度:100% 不适用于触摸板

twitter-bootstrap - 为什么列的总和超过 12?

jquery - Bootstrap 3.0 和 NiceScroll 3.5.0

css - <table> 在我的 <div 类 ="spanX"> 之外的 Bootstrap 中 >

javascript - 在另一个函数加载后加载一个函数

html - 导航栏颜色不显示