twitter-bootstrap 如何更改导航栏和菜单上的字体、背景颜色?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14603773/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 16:14:06  来源:igfitidea点击:

How to change font, background color on navbar & menus?

twitter-bootstrap

提问by user2025234

I've found another SO question where it answers how to change the background color of a navbar, but how do I change the font, font size, etc of the navbar and sub-menus?

我发现了另一个 SO 问题,它回答了如何更改导航栏的背景颜色,但是如何更改导航栏和子菜单的字体、字体大小等?

Thanks,

谢谢,

Joe

回答by Billy Moat

The easiest way is probably to do it via Bootstrap's Customize page:

最简单的方法可能是通过 Bootstrap 的自定义页面来完成:

http://twitter.github.com/bootstrap/customize.html

http://twitter.github.com/bootstrap/customize.html

Alternatively you can just add CSS rules to your main.css file to overwrite the ones on bootstrap.css

或者,您可以将 CSS 规则添加到 main.css 文件中以覆盖 bootstrap.css 上的规则

Use Firebug to inspect the Navbar element and get the class names / styles etc and replace them with whatever styles you want to use.

使用 Firebug 检查 Navbar 元素并获取类名/样式等,并将它们替换为您想要使用的任何样式。