gpt4 book ai didi

css - Bootstrap Rails - 更改背景颜色,不起作用?

转载 作者:行者123 更新时间:2023-11-28 11:10:25 25 4
gpt4 key购买 nike

我已经基于 RailsTutorial 构建了一个 Ruby on Rails 站点。我正在尝试更改一些颜色,但我想不通。

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

我当前的 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;
}
}
...

谢谢

最佳答案

默认情况下,Bootstrap 有很多自定义项。您可以在此处找到所有选项 http://getbootstrap.com/customize/

只需使用 sass 变量而不是 less。

$body-bg: #fff;

$navbar-default-color: #000;

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

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

关于css - Bootstrap Rails - 更改背景颜色,不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21773494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com