1 @font-face { 2 font-family:'iconfont'; 3 src:url('../font/iconfont.eot'); 4 src:url('../font/iconfont.eot?#iefix') format('embedded-opentype'), 5 url('../font/iconfont.woff2') format('woff2'), 6 url('../font/iconfont.woff') format('woff'), 7 url('../font/iconfont.ttf') format('truetype'), 8 url('../font/iconfont.svg#iconfont’) format(‘svg'); 9 } 10 .iconfont { 11 font-family:"iconfont" !important; 12 font-size:16px; 13 font-style:normal; 14 -webkit-font-smoothing:antialiased; 15 -moz-osx-font-smoothing:grayscale; 16 }
在阿里图库里建个项目,每次添加字体图标都加到项目中,然后整个项目复制到你的项目文件里,就可以了,不然每次单独下载生产的文件都不一样,没合起来就出现这样那样的问题