【发布时间】:2021-08-27 15:08:45
【问题描述】:
我在 Angular 项目中使用引导类创建了一个表。只有 table-striped 和 table-hover 类不工作,其余类如 table-primary 工作。而且我还没有写过一行 css 代码(没有覆盖问题)。我已经尝试了堆栈中的其他示例,但没有解决问题出在 tbody 上。我试过包含 tbody 标签但没有用。
<div class="container box" style="margin-top: 10px;">
<table class="table table-striped table-fit table-bordered table-hover">
<thead>
<tr>
<th>Item</th>
<th>Amount</th>
<th>Category</th>
<th>Location</th>
<th>Spent On</th>
</tr>
<tr *ngFor="let entry of expenseEntries">
<th scope="row">{{ entry.item }}</th>
<th>{{ entry.amount }}</th>
<td>{{ entry.category }}</td>
<td>{{ entry.location }}</td>
<td>{{ entry.spendOn | date: 'short' }}</td>
</tr>
</thead>
</table>
</div>
【问题讨论】:
标签: html css node.js angular bootstrap-4