bootstrap-4 - 如何让表悬停引导程序 4 开始工作
问题描述
我创建了一个表,其中填充了数组中的项目,我想向它添加 table-hover 但它不起作用。关于如何使它工作的任何建议?
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>Log Name</th>
<th>Date</th>
</tr>
</thead>
<tbody *ngFor="let log of logs">
<td>{{log.text}}</td>
<td class="log-date"> {{log.date | date: 'short'}} <i (click)="onDelete(log)" typle="button" class="close">×</i></td>
</tbody>
</table>
解决方案
由于您错过了添加表格行标签,因此没有首先创建行来显示悬停功能。
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>Log Name</th>
<th>Date</th>
</tr>
</thead>
<tbody *ngFor="let log of logs">
<tr>
<td>{{log.text}}</td>
<td class="log-date"> {{log.date | date: 'short'}} <i (click)="onDelete(log)" typle="button" class="close">×</i></td>
<tr>
</tbody>
</table>
推荐阅读
- php - 使用 PhpSpreadsheet 在单元格中插入 HTML 代码
- python - “utf-8-sig”是否适合解码 UTF-8 和 UTF-8 BOM?
- r - 用列表和数据框聚合,函数如何知道聚合级别?
- tomcat8 - AWS ALB 很多 504 响应代码
- javascript - 设置新状态不会使用 React Hooks 重新渲染组件
- javascript - 如何使用 javascript 在 3 天内获得 ISO 时间?
- javascript - 我如何读取文件夹节点 js 高级中的文件?
- c# - 成对组合列表中的项目
- php - php:在未定义的变量上回显 isset 不返回任何内容而不是零
- python - 如何从 PDF 生成带有表格标签的 HTML?