2013-09-05 19 views
2

鑑於XUL按鈕和文本框抵抗造型

<button label="Login" class="ATKButton" /> 

只有一些在我的CSS定義的樣式被應用。樣式規則出現在DOM檢查器中,但有些似乎被忽略。

下面是樣式定義,其中註釋了哪些類型的規則有效,哪些會被忽略。

.ATKButton{ 
    background: linear-gradient(#333333, #222222); #ignored 
    border: 1px solid #111111; #ignored 
    border-radius: 2px 2px 2px 2px; #ignored 
    text-transform: uppercase; #ignored 
    font-weight: bold; #ignored   
    letter-spacing: 0.1em; #ignored 
    text-align:right; #ignored 

    color: white; #obeyed 
    cursor: pointer; #obeyed   
    font-size: 10px; #obeyed 
    height: 28px; #obeyed 
    width: 120px; #obeyed 
} 

我也試過直接將頑固的款式,如:

<button label="Login" class="ATKButton" style="background: linear-gradient(#333333, #222222);" /> 

沒有效果。這有什麼竅門嗎?

回答

4

-moz-appearance將(通常)覆蓋此類更改。將其設置爲none以禁用平臺特定的外觀,並改爲使用您的樣式。

+0

非常好,謝謝! – Nick