我可以更改Bootstrap按钮颜色吗? [英] Can I change Bootstrap button color?
本文介绍了我可以更改Bootstrap按钮颜色吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 Bootstrap CSS按钮参考。
我创建了一个按钮: class =btn btn-primary
。
它的背景将是黑色的,文本颜色将是白色的。
I want that it background will be black, and the text color will be white. How can I do it?
推荐答案
您需要覆盖css,以便将背景更改为黑色。一个简单的方法是创建一个自定义css类(你可以把它放在你的HTML中的< style type =text / css>
或将其放在单独的CSS文件中)
You need to override your css so you can change the background to black. A simple way to do this is to create a custom css class (you can either put this in a <style type="text/css">
tag in your HTML or put this in a separate CSS file)
.black-background {background-color:#000000;}
.white {color:#ffffff;}
然后,给你的按钮这些类
Then, give your button these classes
<input type="submit" class="btn btn-primary black-background white" value="Text" />
这篇关于我可以更改Bootstrap按钮颜色吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文