问题描述
我有一个通过 gem 'twitter-bootstrap-rails' 使用 Twitter Bootstrap 的 rails 3.2 应用程序.此外,表单是使用 SimpleForm gem 创建的 对于许多页面,我通过
使用了表单上的 twitter 按钮'btn btn-警告'%>'btn btn-primary'%>
按钮呈现正常.问题是,在您选择访问链接的按钮之一后,返回页面时,文本会卡在灰色版本上,如下所示的返回"按钮:>
这会导致一个问题,特别是在带有btn-primary"样式的按钮上,因为文本难以阅读.一个例子如下:
想知道需要更改哪些设置以及在何处更改.我希望它应该在 bootstrap_and_overrides.css.less 文件中,但不确定要尝试什么设置.对 @linkColorHover 的测试无效.
有什么想法吗?
您始终可以设置 a.btn
项的样式,以删除伪类上的装饰,例如 :visited代码>
I have a rails 3.2 app using Twitter Bootstrap via the gem 'twitter-bootstrap-rails'. Additionally the forms are created with the SimpleForm gem For a number of the pages I've used the twitter buttons on the form via
<%= link_to "Back", :back, :class => 'btn btn-warning'%>
<%= form.button :submit, :class => 'btn btn-primary' %>
The buttons are rendered ok. The issue is that after you select one of the buttons, which visits the link, on returning to the page the text is stuck on the greyed out version as shown below for the 'back' button:
This causes a problem, especially on the buttons styled with 'btn-primary' as the text is hard to read. An example of this is below:
Wondering what setting needs to change and where. I expected it should be in the bootstrap_and_overrides.css.less file but not sure what setting to try. Tests on @linkColorHover didn't work.
Any thoughts ?
You could always style the a.btn
items, to remove the decorations on the pseudo classes such as :visited
这篇关于Rails:访问时 Twitter Bootstrap 按钮获得黑色文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!