2016-08-20 16 views
0

我似乎無法弄清楚這一點。當我點擊我的按鈕並加載目標頁面時,按鈕會丟失其文本樣式。原來的按鈕樣式正在從我使用的wordpress主題中拉出來。我已經包含一個gif和代碼以供參考。有任何想法嗎?按鈕丟失css造型時點擊並加載

見行動:https://imgflip.com/gif/197tc9

.darkbutton { 
    color: #fff !important; 
    border: 2px solid #fff !important; 
    background-color: #0be2a1 !important; 
    margin-top: 4px !important; 
} 

    .darkbutton:hover { 
    color: #0be2a1 !important; 
    border: 2px solid #fff !important; 
    background-color: #fff !important; 
} 
+0

使用對焦狀態告訴我們一些你的代碼? – kukkuz

+0

向我們展示您的html部分 –

+0

停止使用'!important;'如果您需要將其添加到每個屬性,則需要編寫更好的標記。它應該被用作*作爲最後的手段*,而不是在你的CSS的每一行中。有機會過度使用'!important;'會導致顯示問題。 – Scott

回答

1

試試這個:CSS

.darkbutton:focus { 
color: #fff !important; 
}