当我尝试在我的Rails应用程序中加载自定义字体时,它们不会在页面上加载,当我在源代码中检查它们时,我收到404错误。但我是积极的,我已经做好了一切。
CSS:
@font-face {
font-family: "Roboto";
src: local(Roboto Thin), url("/assets/fonts/Roboto-Thin.eot");
src: url("/assets/fonts/Roboto-Thin.eot?#iefix") format("embedded-opentype"), url("/assets/fonts/Roboto-Thin.woff2") format("woff2"), url("/assets/fonts/Roboto-Thin.woff") format("woff"), url("/assets/fonts/Roboto-Thin.ttf") format("truetype");
font-weight: 200;
}
我的字体肯定在/assets/fonts/
以下是application.css
的布局方式:
*= require normalize.css
*= require_tree .
*= require materialize.css
materialize.css
定义我的字体文件
我还需要什么?