@font-face eot 的资产管道问题?iefix
我正在开发一个 Rails 应用程序,尝试使用 Rails 3.1 和资产管道配置字体。
我刚刚看了这篇文章
资产管道、compass font-face 和 eot?iefix 对字体的调用
并使用该示例,我从 sass 得到了语法问题。
我的代码如下:
/* @font-face kit by Fonts2u (http://www.fonts2u.com) */
@font-face {
font-family: 'Coamei Bold';
src: font_url('fonts/COAMEI_B.eot');
src: url('<%= asset_path('fonts/COAMEI_B.eot')+"?#iefix" %>') format('embedded-opentype'),
font_url('fonts/COAMEI_B.woff') format('woff'),
font_url('fonts/COAMEI_B.ttf') format('truetype'),
url('<%= asset_path('COAMEI_B.svg')+"#Coamei-Bold" %>') format('svg');
font-weight:normal;
font-style:normal;
}
由于某种原因,我收到错误
Sass::SyntaxError: Invalid CSS after "...'fonts/COAMEI_B": Expected ")", was ".eot')+"?#iefix... “
我的 css 文件中是否缺少某些内容。任何帮助将不胜感激。
提前致谢
Im working on a rails app trying to configure fonts with rails 3.1 and the asset pipeline.
I just took a look at this post
Asset pipeline, compass font-face and eot?iefix call to the font
and using the example i get a syntax issue from sass.
My code is as follows:
/* @font-face kit by Fonts2u (http://www.fonts2u.com) */
@font-face {
font-family: 'Coamei Bold';
src: font_url('fonts/COAMEI_B.eot');
src: url('<%= asset_path('fonts/COAMEI_B.eot')+"?#iefix" %>') format('embedded-opentype'),
font_url('fonts/COAMEI_B.woff') format('woff'),
font_url('fonts/COAMEI_B.ttf') format('truetype'),
url('<%= asset_path('COAMEI_B.svg')+"#Coamei-Bold" %>') format('svg');
font-weight:normal;
font-style:normal;
}
For some reason i get the error
Sass::SyntaxError: Invalid CSS after "...'fonts/COAMEI_B": expected ")", was ".eot')+"?#iefix..."
Is there something im missing in my css file. Any help would be greatly appreciated.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论