简体   繁体   中英

Changing diameter of Angular material spinner breaks it

This is my code

<mat-progress-spinner  [diameter]="50" mode="indeterminate" ></mat-progress-spinner>

If i remove the diameter it will work properly but if i add diameter it will just show up as a circle and not spin.

Is there a way to resize it to make it smaller?

如果无法使“[diameter]”属性正常工作,则可以选择将高度和宽度分开设置

<mat-spinner style="width:40px; height: 40px" color="primary"> </mat-spinner>

You can change value diameter like this:

<mat-progress-spinner  [diameter]="50" mode="indeterminate" ></mat-progress-spinner>
<mat-progress-spinner  [diameter]="30" mode="indeterminate" ></mat-progress-spinner>
<mat-progress-spinner  [diameter]="10" mode="indeterminate" ></mat-progress-spinner>

Working Demo

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