答案 0 :(得分:1)
尝试这样的事情:
<mat-grid-list [cols]="breakpoint" rowHeight="277px" (window:resize)="onResize($event)">
<mat-grid-tile [class.fullWidth]="breakpoint == 1" class="g1">
<mat-form-field class="example-chip-list">
<mat-chip-list #chipList>
<mat-chip *ngFor="let fruit of fruits" [selectable]="selectable" [removable]="removable" (removed)="remove(fruit)">
{{fruit}}
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
</mat-chip>
<input placeholder="New Players..." #fruitInput [formControl]="fruitCtrl" [matAutocomplete]="auto" [matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur" (matChipInputTokenEnd)="add($event)">
</mat-chip-list>
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
<mat-option *ngFor="let fruit of filteredFruits | async" [value]="fruit">
{{fruit}}
</mat-option>
</mat-autocomplete>
<div style="width: 100% !important;margin-top: 5%;border-top: 2px solid red;">
<button type="button" style="width: 100% !important;margin-top: 5%;" mat-stroked-button color="primary">
<mat-icon>add</mat-icon>CREATE NEW PLAYER</button>
</div>
</mat-form-field>
</mat-grid-tile>
答案 1 :(得分:0)
您可以使用普通CSS来做到这一点。使用平移-它将使元素相对于其在x,y轴上的原点移动固定量(例如像素)。
https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate