来自fontello的图标字体不与Meteor js合作

Sam*_*son 2 html css icons meteor fontello

我已经从fontello下载了一个自定义图标字体,并打算在我的流星应用程序中使用它.我尝试了下载包附带的演示,字体显示正常.这是我的css:

@font-face {
 font-family: 'fontello';
 src: url('fonts/fontello.eot?98991264');
 src: url('fonts/fontello.eot?98991264#iefix') format('embedded-opentype'),
   url('fonts/fontello.woff?98991264') format('woff'),
   url('fonts/fontello.ttf?98991264') format('truetype'),
   url('fonts/fontello.svg?98991264#fontello') format('svg');
font-weight: normal;
font-style: normal;
}

[class^="icon-"]:before, [class*=" icon-"]:before {
 font-family: "fontello";
 font-style: normal;
 font-weight: normal;
 speak: none;
 display: inline-block;
 text-decoration: inherit;
 width: 1em;
 margin-right: .2em;
 text-align: center;

 /* For safety - reset parent styles, that can break glyph codes*/
 font-variant: normal;
 text-transform: none;

 /* fix buttons height, for twitter bootstrap */
 line-height: 1em;

}

.icon-twitter:before { content: '\e805'; } /* '?' */
.icon-github-circled:before { content: '\e804'; } /* '?' */
.icon-pencil:before { content: '\e801'; } /* '?' */
.icon-cancel:before { content: '\e802'; } /* '?' */
.icon-chat:before { content: '\e800'; } /* '?' */
Run Code Online (Sandbox Code Playgroud)

我的文件夹结构是这样的/client/css/styles.css和字体/client/css/fonts/

在我的HTML中,我添加了这个标记<i class="icon-twitter"></i>,不幸的是,当我查看页面时,我看到这就是我所看到的全部内容在此输入图像描述 任何帮助都会很棒.谢谢

fle*_*tch 6

如果要引用字体your.domain.com/fonts/font_name.x,则应将fonts目录移动到标记的目录public.然后,您可以使用路径访问它们/fonts/font_name.x.

看看这里找到的非官方流星常见问题解答:https://github.com/oortcloud/unofficial-meteor-faq#where-should-i-put-my-files

public /#< - 直接提供的静态文件,例如图像.

或直接使用Meteor文档:http://docs.meteor.com/#structuringyourapp

最后,Meteor服务器将提供公共目录下的任何文件,就像在Rails或Django项目中一样.这是图像的地方,favicon.ico,robots.txt,以及其他任何东西.