在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML/ 項(xiàng)目中字體庫(kù)成功加載,但是無(wú)法顯示

項(xiàng)目中字體庫(kù)成功加載,但是無(wú)法顯示

字體庫(kù)加載成功

clipboard.png

但是卻無(wú)法正常顯示,本地開發(fā)環(huán)境可以正常顯示
很奇怪不知道是啥原因

clipboard.png

clipboard.png

這是字體庫(kù)文件的引用和加載代碼

@font-face {
  font-family: 'icomoon';
  src:  url('../fonts/icomoon.eot?q7r210');
  src:  url('../fonts/icomoon.eot?q7r210#iefix') format('embedded-opentype'),
  url('../fonts/icomoon.ttf?q7r210') format('truetype'),
  url('../fonts/icomoon.woff?q7r210') format('woff'),
  url('../fonts/icomoon.svg?q7r210#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-32:before {
  content: "\e900";
}
.icon-2444:before {
  content: "\e901";
}
回答
編輯回答
不二心

你沒(méi)寫 font-family: "iconfont"

2017年5月7日 03:50
編輯回答
糖豆豆

相對(duì)路徑絕對(duì)路徑的問(wèn)題?

2017年2月9日 09:47
編輯回答
旖襯
Failed to decode downloaded font

問(wèn)題解決了,之前報(bào)的這個(gè)錯(cuò),一直沒(méi)看到。
是后端打包的時(shí)候,對(duì)字體庫(kù)進(jìn)行編譯,把字體庫(kù)文件損壞了。

<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>false</filtering>
</resource>
</webResources>

打包的把字體庫(kù)過(guò)濾掉。就可以了
可以參考這個(gè)答案

2018年7月22日 22:05