我已经从 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'; } /* '' */
我的文件夹结构是这样的/client/css/styles.css
和字体/client/css/fonts/
In my html I have added this markup <i class="icon-twitter"></i>
and unfortunately all i see when I view the page this is all I see
Any help would be great. Thanks
如果您想在以下位置引用您的字体your.domain.com/fonts/font_name.x
,你应该移动你的fonts
目录到标记为的目录public
。然后您可以使用路径访问它们/fonts/font_name.x
.
查看此处的非官方 Meteor 常见问题解答: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 和其他任何内容。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)