【问题标题】:Why are my columns appearing below each other instead of next?为什么我的列出现在彼此下方而不是下一个?
【发布时间】:2021-05-17 09:14:23
【问题描述】:

您可以从我的图片底部看到,我的产品显示在彼此下方。如何使它们彼此相邻出现在各自的列上? View image

<tr>
<th>Month</th>
<div *ngFor="let p of products">
    <th><b>{{ p.productLabel }}</b></th>
</div>

【问题讨论】:

    标签: html angular html-table multiple-columns


    【解决方案1】:

    您正在循环一个div,它是一个block 类型的HTML 标记。 请将您的 *ngFor 放在 th 上。

    【讨论】:

      猜你喜欢
      • 2021-08-04
      • 1970-01-01
      • 1970-01-01
      • 2021-04-14
      • 1970-01-01
      • 2010-11-04
      • 1970-01-01
      • 1970-01-01
      • 2018-06-11
      相关资源
      最近更新 更多