如何在同一行显示两个席卡

ab*_*leh 2 angular5

我有未知数量的卡,我想在上面对这些卡进行显示,并将每两张卡显示在一行

<mat-card class="example-card">
  <mat-card-header>
    <div mat-card-avatar class="example-header-image"></div>
    <mat-card-title>{{user.firstName}}</mat-card-title>
    <mat-card-subtitle>{{user.lastName}}</mat-card-subtitle>
  </mat-card-header>
  <mat-card-content>
    <p>
      The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
      A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
      bred for hunting.
    </p>
  </mat-card-content>
  <mat-card-actions>

  </mat-card-actions>
</mat-card>
Run Code Online (Sandbox Code Playgroud)

我正在使用角度5和材质设计6,无论如何要这样做?

小智 7

花了几个小时...真是微不足道:只需将float:left添加到类CSS中即可。就我而言,它看起来像这样:

.example-card {
    max-width: 300px;
    margin-bottom: 50px;
    float: left;
}
Run Code Online (Sandbox Code Playgroud)