2014-10-12 90 views
0

我似乎无法弄清楚我做错了什么。我已经添加了自定义文件。我试图覆盖当前的。我不能添加自定义CSS到我的rails/bootstrap项目

application.css.scss

@import 'bootstrap-sprockets'; 
@import 'bootstrap'; 

/* 
* 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 
*/ 

我应该能够只需添加另一个样式表是否正确?

+0

您的自定义样式表文件未在浏览器中加载?或者你的元素CSS属性不会被覆盖。请详细说明。 – 2014-10-12 14:04:29

+0

我向assets/stylesheets文件夹添加了一个custom.css.scss。我放入的任何CSS都不会改变页面。没有什么可以绕过。它就像资产管道没有看到文件。 – 2014-10-12 14:07:21

+0

你可以检查页面,看看custom.css.scss是否加载。 – 2014-10-12 14:14:55

回答

0

什么,我要做的就是添加

@import '<insert file name here>' 

然后,它的工作。

相关问题