【发布时间】:2020-12-29 13:22:55
【问题描述】:
如何使用 mat-radio-group 在中心垂直对齐一个 mat-hint 或一个 div 内的标签?
今天,我的代码有这个顺序:
<div fxLayout="row" fxLayoutAlign="center center">
<div fxLayout="column" fxFlex="100%">
<div fxLayout="row">
<div fxLayout="column" fxFlex="30%">
<mat-hint>{{ 'É bivolt?' | translate: moduleName }}</mat-hint>
</div>
<div fxLayout="column" fxFlex="70%">
<mat-radio-group id="rgpStaAparelhoBivoltNewUcServicoRessarcDanoEquipEletr"
[(ngModel)]="newUcServicoRessarcDanoEquipEletr.staAparelhoBivolt" [disabled]="staViewing">
<mat-radio-button value="S">{{ 'Sim' | translate: moduleName }}</mat-radio-button>
<mat-radio-button value="N">{{ 'Não' | translate: moduleName }}</mat-radio-button>
<mat-radio-button value="D">{{ 'Não sei' | translate: moduleName }}</mat-radio-button>
</mat-radio-group>
</div>
</div>
</div>
</div>
我想将 mat-hint 与 mat-radio-group 中的值的同一行对齐,而不使用 css。
【问题讨论】: