无法获得.table-striped类

red*_*ift 6 twitter-bootstrap

我无法让我的table-stripe类与我的Bootstrap框架一起工作.

这是我桌子的实时预览.我在HTML中设置了.table-striped类,但它没有在输出中显示.

我究竟做错了什么?

mat*_*gne 26

你的HTML是错的.tbody每个行都有一个标记,但css .table-striped依赖于tr:nth-child()以不同方式设置行的样式:

.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th
Run Code Online (Sandbox Code Playgroud)

修复你的html,这样你就可以通过一个tbody进行迭代.

另外,我在你的资源中看到了bootstrap.css和bootstrap.min.css.一个就够了.