0
我有一個md-select
內md-grid-list
這是md-card
內容的一部分,看起來像這樣:清除按鈕MD-選擇箭頭溢出
<md-grid-tile>
<md-select id="typ" [(ngModel)]="doc.docType" placeholder="Typ Dokumentu">
<md-option *ngFor="let state of states" [value]="state">{{ state}}</md-option>
</md-select>
<button class="clear" [hidden]="!doc.docType" (click)="clear('docType')">X</button>
</md-grid-tile>
正如你可以看到,「X」 buttor呈現當選擇了值並在點擊事件中清除它時。只是將md-select
模型屬性設置爲undefined
現在,我想將'X'按鈕放在mat-select-arrow
上以隱藏/覆蓋它。
你能幫我css風格的'清除'按鈕左移一點,並隱藏該箭頭? 當設置爲margin-right
時,它只會將整個md-select
左移但不包括箭頭。
我相信這對許多人都有幫助。
謝謝!