
我使用本指南来自定义我使用bootstrap创建的网页中的按钮:
Change hover color on a button with Bootstrap customization
问题是我无法在悬停中保持相同的字体颜色,我无法解释为什么它总是变为深灰色.
这是代码:http://codepen.io/anon/pen/ByKZZK
HTML:
CSS:
.btn-custom { color: #FFD180;; background-color: #483737; border-color: #357ebd; /*set the color you want here*/}.btn-custom:hover,.btn-custom:focus,.btn-custom:active,.btn-custom.active,.open>.dropdown-toggle.btn-custom { color: #FFD180; background-color: #837171; border-color: #837171; /*set the color you want here*/}
有任何想法吗?最佳答案似乎某种方式.btn类的bootstrap在你的codepen上得到了更多的重量,你可以尝试避免使用!important更具体的选择器如下:
.btn.btn-custom
检查Codepen 总结
以上是内存溢出为你收集整理的html – 如何更改按钮悬停属性中的文本颜色全部内容,希望文章能够帮你解决html – 如何更改按钮悬停属性中的文本颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)