本來我是這樣定義圖標字體的:(省略woff字體編碼)app
@font-face {font-family: YDUI-ICONS; src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648'); src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648#iefix') format('embedded-opentype'), url('data:application/x-font-woff;charset=utf-8;base64,...) format('woff'), url('../../fonts/iconfont/iconfont.ttf?t=1542201734648') format('truetype'), url('../../fonts/iconfont/iconfont.svg?t=1542201734648#iconfont') format('svg'); }
而後項目的圖標一直是小方框,百思不得其解:svg
而後把woff格式的字體去掉,就能夠了:字體
@font-face {font-family: YDUI-ICONS; src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648'); src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648#iefix') format('embedded-opentype'), url('../../fonts/iconfont/iconfont.ttf?t=1542201734648') format('truetype'), url('../../fonts/iconfont/iconfont.svg?t=1542201734648#iconfont') format('svg'); }
效果:編碼