更新后Meteor.js图标丢失

时间:2016-10-17 10:48:49

标签: javascript html css meteor icons

我更新了我的流星,现在没有显示图标 - 在更新之前一切正常。

文件夹结构:

-public

- 字体

---片剂

---显示器

我使用以下代码访问平板电脑图标:

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

@media screen and (-webkit-min-device-pixel-ratio:0) {
  @font-face {
    font-family: "Flaticon";
    src: url("fonts/tablet/Flaticon.svg#Flaticon") format("svg");
  }
}

[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {
  font-family: Flaticon;
        font-size: 20px;
font-style: normal;
/*margin-left: 20px;*/
}

.flaticon-clock:before { content: "\f100";font-size: 60px; }
.flaticon-clock-circular-outline:before { content: "\f101"; }
.flaticon-cooking-stove-with-heat:before { content: "\f103"; font-size: 60px; color:white;}
.flaticon-one-finger-click-black-hand-symbol:before { content: "\f104"; font-size: 60px;  color:white;}

/*Pfanne blau*/
.flaticon-closed-pan-blue-white:before { content: "\f102"; color:blue; font-size: 140px;padding:0px; padding-left:10px; padding-right:10px;border:1px solid #e0e0e0;}
.flaticon-closed-pan-white-blue:before { content: "\f102"; color:white; background-color:blue; font-size: 140px;padding:0px; padding-left:10px; padding-right:10px;border:1px solid #e0e0e0;}

/*Topf gelb*/
.flaticon-saucepan-yellow-white:before { content: "\f105"; color:yellow; font-size: 120px; padding:10px; border:1px solid #e0e0e0;}
.flaticon-saucepan-white-yellow:before { content: "\f105"; color:white; font-size: 120px; padding:10px; background-color:yellow; }

/*Topf grün*/
.flaticon-saucepan-green-white:before { content: "\f105"; color:green; font-size: 120px;padding:10px; border:1px solid #e0e0e0;}
.flaticon-saucepan-white-green:before { content: "\f105"; color:white; background-color:green; font-size: 120px;padding:10px; border:1px solid #e0e0e0;}


/*.flaticon-saucepan-red:before { content: "\f105"; color:red; font-size: 120px;padding:10px; border:1px solid #e0e0e0;}*/

奇怪的是,此代码在更新之前工作正常,但现在我的应用中没有显示图标和图像。

有人知道这个问题吗?非常感谢你。

1 个答案:

答案 0 :(得分:0)

您可能需要在所有图标路径中添加前导斜杠(' /')。

src: url("fonts/tablet/Flaticon.eot");

也许应该是:

src: url("/fonts/tablet/Flaticon.eot");