gpt4 book ai didi

css - Icomoon.ttf 未加载

转载 作者:行者123 更新时间:2023-11-28 06:07:43 30 4
gpt4 key购买 nike

我遇到了 icomoon 字体的问题。我根本无法加载它们。但是,如果我点击这个 url:

localhost:8080/assets/fonts/icomoon.ttf(我正在做的元素)

我可以将 icomoon.ttf 下载到我的电脑上。如果将它们安装在我的电脑上,一切都很好。 Icomoon 字体作品。但这不是解决方案。

我怎样才能让它发挥作用?我的相对路径似乎是正确的

这是我的结构的一个例子:

 index---
|
assets
|_css
| |---icomoon.css
|
|_fonts
|icomoon files

这是我的 icomoon.css 给你看:

@font-face {
font-family: 'icomoon';
src: url('../fonts/icomoon.eot?cl02ar');
src: url('../fonts/icomoon.eot?cl02ar#iefix') format('embedded-opentype'), url('../fonts/icomoon.ttf?cl02ar') format('truetype'), url('../fonts/icomoon.woff?cl02ar') format('woff'), url('../fonts/icomoon.svg?cl02ar#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"],
[class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-andr:before {
content: "\e900";
}
.icon-arrow_b:before {
content: "\e901";
}
.icon-fbeps:before {
content: "\e902";
}
.icon-instagr:before {
content: "\e903";
}
.icon-instagram_iconeps:before {
content: "\e904";
}
.icon-map-markereps:before {
content: "\e905";
}
.icon-mc:before {
content: "\e906";
}
.icon-plus_b:before {
content: "\e907";
}
.icon-plus:before {
content: "\e908";
}
.icon-radio_icon:before {
content: "\e909";
}
.icon-search_icon:before {
content: "\e90a";
}
.icon-tw_iconeps:before {
content: "\e90b";
}
.icon-yteps:before {
content: "\e90c";
}
.icon-map-markereps2:before {
content: "\e90d";
}
.icon-close_btn:before {
content: "\e90f";
}
.icon-plus_b2:before {
content: "\e910";
}
.icon-plus2:before {
content: "\e911";
}
.icon-top_arrow:before {
content: "\e912";
}
.icon-video_play:before {
content: "\e913";
}
.icon-arrow_c:before {
content: "\e914";
}
.icon-burger:before {
content: "\e915";
}
.icon-minus:before {
content: "\e90e";
}

提前致谢

最佳答案

那真的应该与 css 目录相关吗?

路径不应该来自 Apache 基本路径吗?

src: url('assets/fonts/icomoon.eot?cl02ar');

关于css - Icomoon.ttf 未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36361914/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com