這裏的CSS塊,我加載CSS字體:導軌 - 路徑字體不生產工作,但不會對本地主機
@font-face {
font-family: 'HelveticaNeueRegular';
src: url('../fonts/helveticaneue/helveticaneue-roman.eot');
src: url('../fonts/helveticaneue/helveticaneue-roman.eot?#iefix') format('embedded-opentype'),
url('../fonts/helveticaneue/helveticaneue-roman.woff') format('woff'),
url('../fonts/helveticaneue/helveticaneue-roman.ttf') format('truetype'),
url('../fonts/helveticaneue/helveticaneue-roman.svg#helvetica_neueregular') format('svg');
font-weight: normal;
font-style: normal;
}
的字體位於/app/assets/fonts
目錄。
在本地主機上,當我加載頁面時,字體未加載,但在Heroku上都加載了正確的字體。
出了什麼問題?
您可能需要使用'asset_path' helper。 http://guides.rubyonrails.org/asset_pipeline.html#css-and-erb – doesterr