我正在使用材质设计精简版,并试图在左/右/中心对齐内容。但是无法执行它。这是代码
<div class="dialog-box" *ngIf="showDialogBox">
<div class="dimmer" (click)="hide()"></div>
<div class="container" >
<h3>
<ng-content></ng-content>
</h3>
<form class="ui form" [formGroup]="dialogForm" novalidate>
<div class="field required">
<label>Name</label>
<input type="text" class="name" formControlName="name" placeholder="Enter Name..." maxlength="100" required/>
</div>
<div class="field">
<label>Remarks</label>
<textarea class="remark" formControlName="remark" placeholder="Enter Remarks..." maxlength="1000"></textarea>
</div>
</form>
<ng-content select="[action]"></ng-content>
</div>
</div>
我试过中心文本,mdl-typography - 文本中心类,但设计并不完美,这里是屏幕截图
左拉和左拉正在工作但是中心不起作用。我怎样才能做到这一点?
答案 0 :(得分:1)
它会起作用尝试:
.mdl-card__actions {text-align:center;} /* will make the text in center */
.mdl-chip--contact {display: inline-block; float: none;} /* because it is inline-block it will be affected by text-align property in parent element */