css - 具有行跨度的 td 中 css 类的奇怪行为(Angular)
问题描述
我正在使用一个名为“td-group”的自定义 css 类来自定义具有行跨度的 td,因为我使用的是 angular,所以更具体地说是 [attr.rowspan]。简而言之,css样式并不总是被正确应用,我到处寻找并尝试了一切,但仍然没有弄明白
错误只发生在chrome上,从不在边缘
这里是错误的图像
<tr *ngFor="let r of list; let i = index">
<ng-container *ngIf="group && r.representative.show">
<td class="td-group" [attr.rowspan]="r.representative.height">
{{r.representative.name}}
</td>
</ng-container>
<td *ngFor="let c of cols">
{{r[c.name]}}
</td>
</tr>
Stackblitz https://stackblitz.com/edit/angular-yr3pxq?file=src/app/app.component.html
解决方案
推荐阅读
- python - 如何调用多个 ssh 连接并通过 paramiko 运行命令并以数组格式存储它们的输出
- css - 如何在 css 内容中使用 scss 编译 Fontawesome 唯一代码
- angular - 当模型在技术上没有改变但输入字段值有角度时,如何更新输入字段?
- vba - 需要一个 API VBA 代码来通过标题/标题捕获特定窗口的所有句柄
- html - iphone 5 不显示背景图片
- python - 如何将字符添加到 pandas 列中的日期或 str?
- mysql - 如何在 terraform user_data 上执行 mysql 脚本插入?
- c# - OnTriggerEnter2D() 似乎无法统一
- excel - 如何隐藏 Excel 应用程序并显示用户表单?
- python - 这是我的函数或 Python 中的 docx.Document 的缺陷吗