应用程序.css:
@font-face {
font-family: "Futura-Light";
src: url("/assets/Futura-Light.ttf") format("truetype"); /* For IE */
src: local("Futura-Light"), url("/assets/Futura-Light.ttf") format("truetype"); /* For non-IE */
font-weight: normal;
font-style: normal;
}
* {margin:0px;padding:0px;}
#wrap {width:730px;position:relative;font-family:"Futura-Light";}
我已将此添加到 application.rb:
config.assets.paths << "#{Rails.root}/app/assets/fonts"
我可以在访问时下载字体:http://localhost:3000/assets/Futura-Light.ttf
为什么没有加载字体?