首页 > 解决方案 > ng-container 从下到上显示文本

问题描述

我有一个像这样的 ng 容器:

<ng-container [matColumnDef]="column" *ngFor="let column of columns">
      <th mat-header-cell *matHeaderCellDef>{{ column }}</th>
      <td mat-cell *matCellDef="let element">{{element.name}}</td>
    </ng-container>

我试图 <th mat-header-cell *matHeaderCellDef>{{ column }}</th>从下到上显示文本,而不是从左到右。我尝试使用flex-direction: column ,但它不起作用。有可能做到这一点吗?

在此处输入图像描述

这是我的桌子的设计。我希望符号(A,B,C,D,E)下列中的文本从下到上显示,而不是像现在这样。文本应该是垂直的而不是水平的。

标签: htmlcssangularflexbox

解决方案


轻松使用 flex,只需使用

{flex-direction: column-reverse;}

推荐阅读