позиционирование в - PullRequest
       14

позиционирование в

0 голосов
/ 24 октября 2019

У меня есть, и мне нужно установить данные так, чтобы они были в центре, но перекрывали данные.

<mat-drawer-container class="example-container">
  <mat-drawer mode="side" opened position="start">
    <table>
      <tr *ngFor = "let item of Items">
        <td>
          <button mat-stroked-button class="side-button">{{item.value1}}</button> 
        </td>
      </tr>
    </table>
  </mat-drawer>
  <mat-drawer-content class="content">
    <app-component1></app-component1>
  </mat-drawer-content>
</mat-drawer-container>

Какие параметры могут помочь здесь?

1 Ответ

0 голосов
/ 24 октября 2019

Вы можете решить проблему без параметра. Только используя css flex, проблема решена. Вы можете использовать этот блок кода;


.outline-example-container {
 height: 100%; 
 width: 100%;
 display: flex;
 justify-content: center; // for horizontal 
 align-items: center // for vertical
}

<div class="outline-example-container">
 <mat-drawer-container class="example-container">
   ....
 </mat-drawer-container>
</div>
...