【问题标题】:Bootstrap 3.0 - Static table horizontal size in the panelBootstrap 3.0 - 面板中的静态表格水平尺寸
【发布时间】:2017-02-03 19:07:46
【问题描述】:

我不明白为什么嵌套表的大小是静态的,然后面板随着浏览器的大小而减小。我该怎么办?

<div class="panel panel-primary">
    <table class="table">
        ...

示例:http://www.bootply.com/88846 截图:https://db.tt/JDhkB7oQ

【问题讨论】:

  • 我觉得它工作得很好..你在哪个浏览器上测试过?
  • @PrasannaAarthi 你试过让浏览器变得很窄吗?桌子开始脱离面板。我在 Firefox 24 和 Chrome 30.0.1599.101 上试用过。截图:db.tt/JDhkB7oQ

标签: html twitter-bootstrap twitter-bootstrap-3 html-table


【解决方案1】:

如果您希望您的表格具有响应性,请在表格周围使用 .table-responsive class int eh div,这将创建一个水平滚动条,这样您的内容就不会被切掉。

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

您也可以尝试其他响应式表格解决方案,例如http://elvery.net/demo/responsive-tables/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-01-11
    • 1970-01-01
    • 2016-11-07
    • 2013-09-30
    • 1970-01-01
    • 1970-01-01
    • 2018-01-16
    • 1970-01-01
    相关资源
    最近更新 更多