【发布时间】:2021-07-12 15:18:53
【问题描述】:
chips not center aligned in the first card
我有两张 mat-cards,每张卡片都有一个 mat-chip-list。 当芯片列表为 5 或更大时,芯片的对齐方式在左侧。 请问我是什么问题?
mat-card {
height: 752px;
text-align: center;
display:flex;
flex-direction: column;
}
mat-card-header {
display: block;
flex-direction: row;
flex-shrink: 0;
}
.mat-card-content{
flex-grow: 1;
overflow: auto;
}
<div fxLayout="row wrap">
<div fxFlex="33%">
<mat-card class="mat-elevation-z4">
<mat-card-header>
<mat-card-title>
<h2>title goes here</h2>
</mat-card-title>
</mat-card-header>
<img class="imageBorder" src="assets/laptop-code-solid.svg" alt="" />
<mat-card-content>
content here
</mat-card-content>
<mat-card-actions fxFlexAlign="center">
<mat-chip-list aria-label="Languages">
<mat-chip>C#</mat-chip>
<mat-chip>.Net</mat-chip>
<mat-chip>SQL</mat-chip>
<mat-chip>
JavaScript
</mat-chip>
<mat-chip>HTML</mat-chip>
<mat-chip>Bootstrap</mat-chip>
<mat-chip>CSS</mat-chip>
</mat-chip-list>
</mat-card-actions>
</mat-card>
</div>
</div>
【问题讨论】:
标签: html css layout flexbox angular-material