我在項目中第一次使用ico moon字體。ico moon字體不顯示
我icomoon css文件:
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?nmzwdp');
src: url('fonts/icomoon.eot?nmzwdp#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?nmzwdp') format('truetype'),
url('fonts/icomoon.woff?nmzwdp') format('woff'),
url('fonts/icomoon.svg?nmzwdp#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="inf-"], [class*=" inf-"] {
/* 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;
}
.inf-chrome:before {
content: "\ead9";
}
.inf-chrome{ text-indent: 0 !important;
background-image: none !important;
font-size: 16px;
}
我使用icomoon字體primeface代碼:
<p:commandButton value="Temps3" icon="inf-chrome"
style="height: 25px;width: auto;"/>
Finaly我ICO月亮字體不顯示,請人給的答案。
只是我改變了類名inf-insteadof icon-(默認類),例如,[class^=「icon-」],[class * =「icon-」] ---> [class^=「inf - 「],[class * =」inf-「] –