如何自定义Bootstrap? [英] How to customize Bootstrap?
本文介绍了如何自定义Bootstrap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为导航等使用新颜色来自定义引导程序.我将如何创建一个单独的CSS文件来覆盖bootstrap.css上的某些内容? (我不想弄乱引导程序的css文件,以防引导程序有更新,而且我不必重新添加任何内容).
I want to customize bootstrap using new colors for navs and such. How would I create a separate css file that overrides some of the things on bootstrap.css? (I don't want to mess with the bootstrap css files, incase there are updates to bootstrap, and I don't have to re-add anything).
如何更改自定义CSS文件中导航栏的颜色?
How do I change the color of the navbar in my custom CSS file?
推荐答案
您可以在包含自举程序后添加自定义样式表:
You can add the custom stylesheet after include bootstrap:
<link href="bootstrap.css" rel="stylesheet" type="text/css" />
<link href="mySpecial.css" rel="stylesheet" type="text/css" />
然后,您覆盖所需的样式.所以会是这样的:
Then, you override the styles you want. So will be something like:
.btn-success {
color: orange;
}
显示一个丑陋的橙色文本绿色按钮.
for an ugly orange text green button.
这篇关于如何自定义Bootstrap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文