Css 引导轨道-更改背景颜色,不工作?

Css 引导轨道-更改背景颜色,不工作?,css,ruby-on-rails,ruby-on-rails-3,twitter-bootstrap,Css,Ruby On Rails,Ruby On Rails 3,Twitter Bootstrap,我基于RailsTutorial构建了一个RubyonRails站点。我想换一些颜色,但我想不出来 我想更改背景色[页面正文]和菜单文本的颜色。我在哪里可以做这个 我当前的custom.css.scss: @import "bootstrap"; /* mixins, variables, etc. */ $grayMediumLight: #eaeaea; @mixin box_sizing { -moz-box-sizing: border-box; -webkit-box-s

我基于RailsTutorial构建了一个RubyonRails站点。我想换一些颜色,但我想不出来

我想更改背景色[页面正文]和菜单文本的颜色。我在哪里可以做这个

我当前的custom.css.scss:

@import "bootstrap";

/* mixins, variables, etc. */

$grayMediumLight: #eaeaea;

@mixin box_sizing {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* universal */

html {
  overflow-y: scroll;
}

body {
  padding-top: 60px;
}

section {
  overflow: auto;
}

textarea {
  resize: vertical;
}

.center {
  text-align: center;
  h1 {
    margin-bottom: 10px;
  }
}
table td {
  padding:0px 25px 0px 0px;
}
table th {
  text-align: left;
  padding:0px 25px 0px 0px;
}



/* bootstrap */

.navbar-inner {
  background-color: white; /* background color will be black for all browsers */
  background-image: none;
  background-repeat: no-repeat;
  filter: none;
}


/* typography */

h1, h2, h3, h4, h5, h6 {
  line-height: 1;
}

h1 {
  font-size: 3em;
  letter-spacing: -2px;
  margin-bottom: 30px;
  text-align: center;
}

h2 {
  font-size: 1.2em;
  letter-spacing: -1px;
  margin-bottom: 30px;
  text-align: center;
  font-weight: normal;
  color: $grayLight;
}

p {
  font-size: 1.1em;
  line-height: 1.7em;
}
p2 {
  font-size: 1.1em;
  line-height:1.7em;
  font-weight: bold;
}

/* header */

#logo {
  float: left;
  margin-right: 10px;
  font-size: 1.7em;
  color: black;
  letter-spacing: -1px;
  padding-top: 9px;
  font-weight: bold;
  line-height: 1;
  &:hover {
    color: white;
    text-decoration: none;
    background-color: black;
  }
}
...
谢谢

试试看

div.navbar{
background: red;
color:#fff
}

根据需要更改颜色。

更改导航栏的颜色

.navbar {
   background-color: red;
}
更改导航栏导航链接颜色的步骤

.navbar-nav > li > a {
   color: blue;
}

默认情况下,引导有很多自定义项。您可以在这里找到所有选项

只需使用sass变量,而不是更少

$body-bg: #fff;

$navbar-default-color: #000;

$navbar-default-link-color: #000;

等等……你会得到你想要的

对不起,我不清楚。文本颜色起作用了,但正文的背景色(不是导航栏)感谢您,为什么不在正文上添加css{background color:red;}就解决了这个问题。需要在scaffolds.css.scss中,而不是在custom.css.scss中。谢谢