近期阿里图标库官网维护,至今还是不能上传新的图标,给开发造成影响
为了不影响开发,我们需要阿里图标库的替代方案
国际图标库网站 https://icomoon.io/
使用教程
1.https://icomoon.io/app/#/select
将图标的svg文件上传到icomoon上
2.设置相关的字体类名
3.如果与阿里图标库的字体影响,需要修改匹配规则
@font-face {
font-family: 'icomoon';
src:
url('fonts/icomoon.ttf?5qr2o') format('truetype'),
url('fonts/icomoon.woff?5qr2o') format('woff'),
url('fonts/icomoon.svg?5qr2o#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
i { /* 这里可以新增一个类名匹配对应的font-family*/
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: never;
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;
}