2014-10-12 105 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>' 

然後,它的工作。

相關問題