twitter-bootstrap - Bootstrap 逆表和样式不正确

标签 twitter-bootstrap html-table css-tables

在处理基于 Bootstrap 的项目时,我遇到了一个奇怪的问题,其中一些样式被用户代理样式表(在 Chrome 和 Firefox 中)覆盖。我找到了this related issue ,通过包含 <!DOCTYPE html> 解决了这个问题我最初省略的标签。但现在我无法获得 .table-inverse , .thead-inverse , 或 .thead-default类来遮蔽我的表头。据我了解,我拥有所有必要的行、容器等。

为什么阴影不起作用?

.navbar {
  border-radius: 0px
}
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />

<h2 class="display-1">Bootstrap 4 Inverse Table</h2>

<div class="container">
  <div class="row">
    <div class="col-md-6 col-md-offset-3">
      <table class="table table-inverse">
        <thead>
          <tr>
            <th>#</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Username</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th scope="row">1</th>
            <td>Mark</td>
            <td>Otto</td>
            <td>@mdo</td>
          </tr>
          <tr>
            <th scope="row">2</th>
            <td>Jacob</td>
            <td>Thornton</td>
            <td>@fat</td>
          </tr>
          <tr>
            <th scope="row">3</th>
            <td>Larry</td>
            <td>the Bird</td>
            <td>@twitter</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>


View on JSFiddle

最佳答案

对于像我这样找到此线程但使用 Bootstrap 4.0.0-beta.2 或更高版本的人,逆表逆序已替换为 -黑暗根据链接的版本发布信息here

关于twitter-bootstrap - Bootstrap 逆表和样式不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35233768/

相关文章:

html - 如何使用 BootStrap 将表单水平居中?

html - 我想设计我的表格,如图所示

html - 使用 div 使表格拉伸(stretch)

html - 多列形式的不同大小输入

html - 将 Angular 功能区添加到 Bootstrap 站点

javascript - 我怎样才能让我网站上的这个按钮重定向到网站上的另一个页面?

javascript - 在表中显示/隐藏值

javascript - 如何从 chart.js 的 html 表中动态添加元素

html - 如何使用CSS样式化递归目录?

html - 如何使用 Bootstrap 将 header 中的现有 div 包含在移动菜单中?