2016-04-11 42 views
0

我的問題是,我必須設置我的網站上的所有選定的箭頭默認隱藏下面的代碼。HTML,CSS |選擇以前刪除的箭頭顯示

select::-ms-expand { 
     //remove default down arrow in IE 
     display: none; 
    } 

    select.form-control { 
     -moz-appearance: none; 
     -webkit-appearance: none; 
     appearance: none; 
    } 

然後我創建了一個新的選擇,我不想攜帶這個效果。我希望這顯示爲默認值。我的問題是我爲了覆蓋這個需要放置什麼。

select.select-p-text::-ms-expand { 
    //remove default down arrow in IE 
    display:    ?; 
    } 

    select.select-p-text.form-control { 
    -moz-appearance:  ?; 
    -webkit-appearance: ?; 
    appearance:   ?; 
    } 

感謝,

基蘭

+0

你可以製作一個jsFiddle讓人們更容易理解第二? –

+2

@AndyHolmes他隱藏了選擇形式元素中的所有這些小箭頭。現在他想知道如何再次展示他們的單一元素,以及他必須寫出什麼來實現這一點。操作必須看這裏:https://css-tricks.com/almanac/properties/a/appearance/ – Fuzzyma

回答

1

嘗試使用此代碼先生

select:not(.selectClass)::-ms-expand { 
     //remove default down arrow in IE 
     display: none; } 

    select:not(.selectClass).form-control { 
     -moz-appearance: none; 
     -webkit-appearance: none; 
     appearance: none; } 

這將使稱爲裏面的類:沒有()繼承無CSS設計

+0

好的解決方案,謝謝 – Kieranmv95

+0

你是最受歡迎的。 – Abbr