引导表 \- 较小的字体大小

新手上路,请多包涵

我在我的 html 中使用引导表:

 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style>
.table-condensed {
width: 90% !important;
}

而且我想让表格中的字体大小更小。如何调整当前代码以获得所需的输出。提前谢谢了。

原文由 martinkabe 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 303
1 个回答

先生。我会尝试这样的事情:

 .table-condensed{
  font-size: 10px;
}
 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<table class="table table-condensed">
  <thead>
    <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Email</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>Doe</td>
      <td>john@example.com</td>
    </tr>
    <tr>
      <td>Mary</td>
      <td>Moe</td>
      <td>mary@example.com</td>
    </tr>
    <tr>
      <td>July</td>
      <td>Dooley</td>
      <td>july@example.com</td>
    </tr>
  </tbody>
</table>

我得到了你的小提琴: https ://jsfiddle.net/mqhd0js6/。希望能帮助到你!

原文由 Nelutu Fona 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题