html - Bootstrap 表 - 较小的字体大小

标签 html css

我在我的 html 中使用 Bootstrap 表:

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

而且我想使表格中的字体大小小得多。如何调整当前代码以获得所需的输出。非常感谢。

最佳答案

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

.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>

我得到了你的 fiddle :https://jsfiddle.net/mqhd0js6/ . 希望对您有所帮助!

关于html - Bootstrap 表 - 较小的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40125329/

相关文章:

javascript - 如何使用 Adob​​e Air 制作 Growl 通知?

javascript - 需要使用提交表单在 CSS 中转换 HTML 表格

html - Canvas 和视频 - HTML5

javascript - 单击外部或 ESC 时关闭模态窗口

d3.js 的 HTML5 canvas 替代品,图形可视化库

html - 使用 max-height 和 max-width 垂直居中图像

html - css 中的 body 和 (*) 属性

html - 悬停时模糊叠加展开

javascript - 如何居中 Dijit Select 小部件?

html - 网格布局不起作用