我试图从CSS文件中运行字体文件:
此代码工作正常:
src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff2?v=4.5.0") format("woff2"), url("../fonts/fontawesome-webfont.woff?v=4.5.0") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.5.0") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular") format("svg");
但是这段代码不起作用:
src: url("#{resource['fonts/fontawesome-webfont.eot?#iefix&v=4.5.0']}") format("embedded-opentype"), url("#{resource['fonts/fontawesome-webfont.woff2?v=4.5.0']}") format("woff2"), url("#{resource['fonts/fontawesome-webfont.woff?v=4.5.0']}") format("woff"), url("#{resource['fonts/fontawesome-webfont.ttf?v=4.5.0']}") format("truetype"), url("#{resource['fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular']}") format("svg");
加载字体文件的正确方法是什么?