2017-06-15 92 views
0

這有點笨,但它真的很煩人。如何更改實現輸入字段的默認顏色[type = search]?覆蓋物化默認輸入顏色

默認情況下,它的顏色是粉紅色的,當我做到這一點

.input-field input:focus { 
    background: transparent !important; 
    background-color: transparent !important; 
    } 
    .input-field input { 
    background: transparent !important; 
    background-color: transparent !important; 
    } 
    .input-field { 
    background: transparent !important; 
    background-color: transparent !important; 
    } 

什麼也沒有發生我想到的是,輸入字段將是透明的,但仍然被證明是一個粉紅色是在路上我想做的事。我在這裏錯過了一堂課嗎? 我也可以改變它的背景顏色和它的工作很好,但問題是我不能擺脫那煩人的默認顏色粉紅色。

+0

可以複製的問題,或者在這裏使用的代碼片斷功能,或者像jsfiddle.net或codepen外部工具? – gaynorvader

+0

嗨,你可以提供的HTML ..默認的粉紅色顏色是導航標籤背景顏色.. –

+0

@ChandraShekhar有趣的我認爲這是:)我會盡快嘗試 –

回答