我在我的rails项目中使用bootstrap,我在输入字段上使用input-append css类并提交按钮。所有的作品都很好,除非我将鼠标悬停在提交按钮上时,样式变为蓝色。看起来像忽略了class .btn,我为它设置了默认的灰色,默认为提交按钮具有的蓝色。bootstrap提交按钮,即使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,所以我们可以有一些工作,因为这个作品:'.btn {background-color:#ddddd;}'例如 –
我的CSS只是引导CSS文件。 – Chapsterj