前端阿里云iconfont 字体图标正确使用方法
uniapp+vue2.0开发 之 阿里云字体图标在项目中引用(支持所有端)
·
效果图
https://www.iconfont.cn/home/index 添加图标至项目
我的项目 font class 下载至本地
https://transfonter.org/ 网站转码
/**
* 1. 点击add fonts 上传 下载至本地的iconfont.ttf文件
* 2. 勾选 Base64 encode
* 3. 点击 convert 转换
* 4. 点击 download 下载 (此下载按钮需要以上步骤完成才能出现)
* 5. 解压下载文件把stylesheet.css 即 @font-face 部分放入项目
* 6. 返回 我的项目 font class 复制代码为class属性 点击编辑获取 Unicode(16进制)e64b
* 首页 复制代码为 icontupian 编辑获取Unicode(16进制)为e604 本文件使用 .icontupian:before { content: "\e604";}
*/
@font-face {
font-family: 'iconfont';
src: url('data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAe0AA0AAAAADVwAAAdeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GVgCCahEICo1kilwLFAABNgIkAyAEIAWFCAdbG9oKEVWsmSD7SMhNtL7FdzHFYiqtXJn9PL/NP/fRD2zqWWAURjfpXCSiWwO6KFwUi3rk1kZuv811Ez+65fl/b/dv74xGOJEEQi/GSJI4ns//vaqZE2NrYcCi9N7LvCfnhcfibz+xteiDZQgEcLcU68KxLQVtrVjVMsypdq0TNP860QEA6HRw9kQxAQDebZ26rrJCcJCcDywRScGEUM8CgEJFh4EGsBt7CACH8PujD1IQEwBD66CfvamtfAkUfc7+qoBimDHAHMpeMAAAAjgF88CMfEkWMTtV1WfxxIShv+zPeZ+3fr7k8z1fFczMAPBRxJ/ED8QwcY7Yyr8PCK6hATl61CSx0i8PFIb2DDQGFvhCQQiAHRp/NFChGkBjThYEe/4VFiwWUKk48lgg5XAQA7H4gbVeNO9VZqf8hCPN8bHyDZfotDvTPMYjB8Jfcwgt9yJIHvl6hPMT1bBLyTeBq9jnsXnl6dn5+fEhIYGBcUnyvLwmiVSaoEwJJjcWJkpMzM2tzMfTsrLy4gIDg4LiixXFzbGq0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MOw03FrTfQPbS91ZWNQ09elO/fUkqshEj6u9o27c+KTlSnrhkZc+a9RiVgumMwiClhIIFK2wWHRfzcM2b8LmG6LNm+eh+QhRQvBLbbrOITwPHgw6cOADT3/2d7zv+N/zvq+2ibbWMTqKmbvDU//x+SeV0ffRUoHkMKQ3n0lP9wzxD/FU7L7+voPKtwiZrzwXNr4Vt13SQBxu/qy0KGqJit90ZrWyaqf004vqnStY0yslfgP4XI93XPV4Slnlygu9frRtuz4nkKpZCvBe2bbuBai8Rrq5R3aw+CY+myg2nz7Go//Qo5HKAriv5ihO6NjK1rDlNtqdh+9kZfaiaL0T/+HD/0YA6wbaDZtBbVDTXti2ptCXvhQ896/Cnwo9Xl5PlxvCdofRD1g9gY0Kxpo9hFlvXnrlfjPfK+9nsqmww65ibENYlD0AmCDVIbErikIAgIrRe5GZER06aYQNFgQNWdF6o/XEEACWnxGHvQ247AOYoebr/SErPHGRD2GS+zAMK0ApUu8GFarP+WjYboAO1R/5cLFVcpjNr0woUFgAIAHQh3gr8WE8zQUFqjtBherDPhq+YdCh+okPp/T1XbFF1krAldJSW0hPbQmxRdYT67DYKiu1OUv0cIDfAWQHMfanCGlolIPiwwBSahqdlltIC77zOGn9ycVoJTUtnY5usWQJksAVosWTE5Layiux0pLWbrNep4tGSoFdr40gaNtiRcAr+hDUlluulMRWF2NpBouLphLAw8VGXZcmRa9vu6bEnqRnF3apb46XANqHF1bLkWhItQ1cSrB4Sg4X/LytNTsyD5x0qfFYIGddFcEKQxRERTRERwz6WnXHhvYOur5zdcfClZzFVl7X3kmgzm6kLFyyhKpbrNNhS3UAAA==') format('woff2'),
url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAnsAA0AAAAADVwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAJ0AAAABoAAAAcjlmejUdERUYAAAmwAAAAHgAAAB4AKQAPT1MvMgAAAaAAAABCAAAAVjx5Sz1jbWFwAAACBAAAAFcAAAFquK60OWdhc3AAAA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0QuHr4Nv4hPgvuBw8L76NCPqJ5a70JUMiy0FU3ExQV8vf4WuLiNlGhaFFp84wXZZgkYkiOynBhADlDRXFer8jxM8H73z/76uIzPeL9LKtci3SqevY9T7Vquj0aPTCTaU1HUA0iBL98YWskH38OyRd+8aO/8OpPfxwvapQQhIwOP7GbfeXJu7dNS5J02znWsFk0OYlunksH1fPZ6W/6D367q16Yl5KkoZmD7f7XRgbVP+tHjEhEVJ/q9DyEljz7+pna3kP36cP73uK0VFGwZMhujZiG13lzdSwdqgovBxWiL+NReHRGzcN9/AHeBxJwAahBecOBXozpGM4icadjHNPmV+EBPHj07j6Fv4pu37Ku0oPn6eqxEF1U8P6dK1eu4Ourfzy++vly+ZuLnc7L8Nx3wP8AdU4L7AAAAHjafZA9TgMxEIWf8wckEkIgqF1RANr8lCkTKfQIpaNINt6QaNdeeZ1IOQEtFQeg5RgcgBsg0XIKXpZJkyJr7ejzm5nnsQGc4xsK/98l7oQVjvEoXMERMuEq9RfhGvlduI4WPoUb1H+Em7hVA+EWLtQbHVTthLub0m3LCmcYCFdwiifhKvWVcI38KlzHFT6EG9S/hJsY41e4hWtlqQzhYTBBYJxBY4oN4wIxHCySMgbWoTn0ZhLMTE83ehE7mzgbKO9XYpcDHmg554Ap7T23Zr5KJ/5gy4HUmG4eBUu2KY0uInQoG18snNXdqHOw/Z7ttrTYv2uBNcfsUQ1s1Pw92zPSSGwMr5CSNfIyt6QSU49oa6zxu2cp1vNeCIlOvMv0iMeaNHU6925p4sDi5/KMHH20uZI996gcPmNZCHm/3U7EIIpdhj+T2HEZAAAAeNpjYGKAAC4G7IATiBkZmBiZGJkZWRhZGdkY2dnKUzOrMjLZSkoLMhPzeJIT84ozSoszUoFizIkpKSzFycXFTFnFACe3DksAAAAAAf//AAIAAQAAAAwAAAAWAAAAAgABAAMACAABAAQAAAACAAAAAHjaY2BgYGQAgqtL1DlA9J2o3YdgNABDTwcQAAA=') format('woff');
font-weight: normal;
font-style: normal;
font-display: swap;
}
.iconfont {
display: inline-block !important;
font-family: "iconfont" !important;
font-size: 40rpx;
color: #FF7E98;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icontupian:before {
content: "\e615";
}
.iconadd:before {
content: "\e664";
}
.iconscss:before {
content: "\e688";
}
.iconweizhi:before {
content: "\e60b";
}
.iconcanshushezhi:before {
content: "\e65a";
}
.iconjs:before {
content: "\e93e";
}
使用案例:
<view class="iconfont icontupian"></view>
更多推荐
已为社区贡献2条内容
所有评论(0)