简体   繁体   中英

Aligning mat-spinner in bootstrap row

I have a mat-spinner in a bootstrap row. I want to right align the mat-spinner in the row:

<div class="row">
  <div class="col-3">
    <div class="spinner-wrapper">
      <mat-spinner [diameter]="30" value="indeterminate">
      </mat-spinner>
    </div>
  </div>
</div>

I've tried following things individually on the spinner-wrapper class, but did not work:

margin: 0 auto;

text-align: right;

float: right;

None of these worked.

How can I right-align the mat-spinner?

You have to add this css properties to each element:

.spinner-wrapper{
   text-align:right;
}

mat-spinner{
   display:inline-block;
}

Hope it help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM