![](/img/trans.png)
[英]Twitter bootstrap .btn class: Button text color changes after being clicked on
[英]bootstrap submit button showing blue color even after btn class added
我在Rails項目中使用引導程序,並且在輸入的提交和提交按鈕上使用了input-append css類。 除了當我將鼠標懸停在“提交”按鈕上時,所有樣式都很好,樣式變為藍色。 看起來它忽略了我在其上為其默認的灰色設置的.btn類,並默認為提交按鈕具有的藍色。
<div class="input-append">
<%= text_field_tag :password, "", :class => 'span2' %>
<%= button_tag "Submit", :class => 'btn'%>
</div>
這是此代碼輸出到html的內容。
<div class="input-append">
<input type="text" value="" name="password" id="password" class="span2">
<button type="submit" name="button" class="btn">Submit</button>
</div>
還有誰有相同的問題嗎。 同樣,它僅處於懸停狀態。
我建議您調查一下CSS,找到會影響按鈕的懸停偽選擇器,然后刪除或覆蓋它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.