阿里icon
阿里icon在引用的时候引用在线地址
@font-face {
font-family: 'iconfont'; /* Project id 2906019 */
src: url('http://at.alicdn.com/t/font_2906019_2o88ik7i0vb.woff2?t=1636356450779') format('woff2'),
url('http://at.alicdn.com/t/font_2906019_2o88ik7i0vb.woff?t=1636356450779') format('woff'),
url('http://at.alicdn.com/t/font_2906019_2o88ik7i0vb.ttf?t=1636356450779') format('truetype');
}
ios端会显示空白
先将iconfont.woff 转化为base64
转换地址:https://www.giftofspeed.com/base64-encoder/

修改为
@font-face {
font-family: "iconfont";
src: url('data:font/truetype;charset=utf-8;base64,此处为转换的base64') format('truetype');
}

本文介绍如何在iOS应用中正确引用阿里iconfont,通过将字体文件转换为base64编码,解决了字体图标在引用时空白显示的问题,适合前端开发者参考。
3315

被折叠的 条评论
为什么被折叠?



