如何更改twitter bootstrap背景颜色

bet*_*res 6 css html5 twitter-bootstrap

我已经尝试过网站上的自定义功能,但一直给我错误,并尝试了BASIC方法:

body {background-color:red;}
Run Code Online (Sandbox Code Playgroud)

那么,有谁知道?

sco*_*ord 13

下载所有的bootstrap文件和.css文件中的某处添加:

body {
   background:red !important;
}
Run Code Online (Sandbox Code Playgroud)


小智 9

在Bootstrap 3中更改背景颜色的正确方法是使用bg-*类.对于红色有bg-danger.也可用bg-primary, bg-success, bg-info and bg-warning. http://getbootstrap.com/css/#helper-classes-backgrounds