我不知道如何在简单的Meteor应用程序中使用Glypicons:
meteor create meteor-introcd meteor-intrometeor (运行该应用程序,它运行得很好)meteor add bootstrap-3流星应用程序运行,但图标没有呈现。我怎样才能让他们渲染??
发布于 2014-08-07 16:12:07
您应该将字体和图像放置在Meteor /public文件夹中,然后将.css文件的@font-face属性中url的相对路径更改为指向它们的位置。
因此,如果来自Meteor应用程序主文件夹的新的相对文件路径变为public/glyphicons_pro/glyphicons/web/html_css/fonts,则将@font-face属性更改为对应于公用文件夹中的位置:
@font-face {
font-family: 'Glyphicons Regular';
src:
url('/glyphicons_pro/glyphicons/web/html_css/fonts/glyphicons-regular.eot');
src:
url('/glyphicons_pro/glyphicons/web/html_css/fonts/glyphicons-regular.eot?#iefix') format('embedded-opentype'),
url('/glyphicons_pro/glyphicons/web/html_css/fonts/glyphicons-regular.woff') format('woff'),
url('/glyphicons_pro/glyphicons/web/html_css/fonts/glyphicons-regular.ttf') format('truetype'),
url('/glyphicons_pro/glyphicons/web/html_css/fonts/glyphicons-regular.svg#glyphiconsregular') format('svg');
font-weight: normal;
font-style: normal;
}您应该将.css文件放在Meteor目录的一部分中,其中仅在客户端提供。
*并从您的链接删除-文件是自动加载在您的应用程序,一旦他们被放置在适当的目录。
https://stackoverflow.com/questions/25186110
复制相似问题