2016-03-03 32 views
0

我又增加了不同的CSS文件兩個控制器,但我的整個應用程序只從product.css我的整個Rails應用程序只能從一個文件爲什麼

採取的CSS我又增加了不同的CSS文件兩個控制器越來越CSS但我的整個應用程序只走CSS從product.css 我又增加了不同的CSS文件兩個控制器,但我的整個應用程序只從product.css

products.css採取CSS

body { 
    font-size: 11px; 
    font-family: 'Open Sans', sans-serif; 
    color: #4A4A4A ; 
    text-align: center; 
} 

.wrap { 
    background: #fff; 
    margin: 20px auto; 
    display: block; 
    width: 300px; 
    height: 380px; 
    padding:20px; 
    border-radius: 2px 2px 2px 2px; 
    -webkit-box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset; 
    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; 
    box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset; 
    float: left; 
    margin-right: 29px; 
} 

.wrap img { 
    width: 100%; 
    margin-top: 15px; 
} 

p{ 
    margin-top: 15px; 
    text-align: justify; 
} 

h1{ 
    font-size: 20px; 
    font-weight: bold; 
    margin-top: 5px; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3); 
} 

a{ 
    text-decoration: none; 
    color: #4A4A4A !important; 
} 

a:hover{ 
    text-decoration: underline; 
    color: #6B6B6B !important ; 
} 

**

+0

請不要問同樣的問題兩次。相反,編輯您的問題添加一些更多的細節 - 它會在列表中向上移動。請在這個問題以及您的application.css文件中顯示您的其他css文件。您如何知道products.css是唯一正在使用的文件? – BroiSatse

回答

0

好吧你使用SCSS與CSS混合,我的建議是使用

@import '/*'; 
@import '/**/*'; 

改變product.css成product.scss並導入路徑根據您的文件夾結構否則rails會拋出一個錯誤,如果它找不到任何文件,因爲rails沒有拾取scss文件。

你也可以刪除所有資產管道的東西,並@import'font-awesome';

+0

試過了,但什麼也沒有發生@鍾惠 –

+0

你的文件夾結構是什麼樣的?和文件擴展名。 –

+0

能否請你解釋一下你的文件夾結構是什麼意思@Chong Hui –

相關問題