第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

選擇選項后,如何將 Angular Material mat-autocomplete 文本顏色更

選擇選項后,如何將 Angular Material mat-autocomplete 文本顏色更

largeQ 2023-12-25 16:13:01
我不想更改占位符顏色,因為我已經(jīng)完成了,但選擇一個選項后,文本顏色仍然是黑色。這是我的 HTML<form *ngIf="videos">    <mat-form-field class="search-form">      <input type="text" placeholder="Search Gamer-Tags" aria-label="Number" matInput [formControl]="myControl"        [matAutocomplete]="auto">      <mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption (optionSelected)='searchChange($event.option.value)'>        <mat-option class="auto-option" *ngFor="let option of filteredOptions | async" [value]="option">          {{option}}        </mat-option>      </mat-autocomplete>    </mat-form-field>  </form>這是我的 SCSS::ng-deep .mat-focused .mat-form-field-label {color: white !important;}::ng-deep .mat-form-field-underline, ::ng-deep .mat-form-field-ripple {background-color: white !important; color: white !important }::ng-deep .mat-form-field-empty.mat-form-field-label { color: white !important;}::ng-deep .mat-form-field-ripple { background-color: white;}
查看完整描述

3 回答

?
人到中年有點甜

TA貢獻1895條經(jīng)驗 獲得超7個贊

要刪除墊輸入自動填充,background color您可以簡單地使用 在您的主要 style.scss/css您可以使用


.mat-form-field-autofill-control{

  background-color: wheat; // your prefered color 

}


查看完整回答
反對 回復(fù) 2023-12-25
?
婷婷同學(xué)_

TA貢獻1844條經(jīng)驗 獲得超8個贊

對于角度 10


組件.sccs


.buscador {

    color: white !important;

}


:host ::ng-deep .mat-form-field-underline {

    background-color: white !important; 

 }

 :host ::ng-deep .mat-focused .mat-form-field-underline .mat-form-field-ripple {

 background-color: white !important;

}


組件.html


  <form>

    <mat-form-field>

        <mat-label id="placeholder" class="buscador">Buscar...</mat-label>

        <input type="text" aria-label="Number" matInput [formControl]="myControl" [matAutocomplete]="auto" type="text" name="option" required minlength="3">

        <mat-autocomplete #auto="matAutocomplete" name="option">

            <mat-option *ngFor="let option of options | async" [value]="option">

                {{option}}

            </mat-option>

        </mat-autocomplete>

    </mat-form-field>

</form>


查看完整回答
反對 回復(fù) 2023-12-25
?
搖曳的薔薇

TA貢獻1793條經(jīng)驗 獲得超6個贊

我確實找到了如何更改它,需要添加此代碼來更改輸入的類顏色。

::ng-deep input.mat-input-element { color: white; }


查看完整回答
反對 回復(fù) 2023-12-25
  • 3 回答
  • 0 關(guān)注
  • 226 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號