gpt4 book ai didi

css - 覆盖 Rails SASS Bootstrap CSS

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

我正在使用 rails 4.1.8、sass-rails 4.0.3 和 bootstrap-sass 3.3.3,我很难覆盖一些 css。

我的 application.css.sass 文件是这样的

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/


@import "bootstrap-sprockets"
@import "bootstrap"

我有另一个名为 header.css.scss 的文件,我正在尝试为 header 标签指定一个字体大小,它不会改变。但是,当我测试时,其他 3 个属性会正确更改。

header{
background: #0099da;
color: #ffffff;
font-size: 2em;
height:100px;
}

当我尝试更改图例标签时,同样的事情发生了。

最佳答案

您需要导入 header.css.scss after bootstrap

关于css - 覆盖 Rails SASS Bootstrap CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28279277/

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