選擇最新免費使用版本下載:
2.1 進入轉(zhuǎn)換網(wǎng)站transfonter.orghttps://transfonter.org/
2.2 解壓下載好的 fontawesome-free-5.0.13.zip
2.3 點擊網(wǎng)址上的Add fonts:
點擊Add fonts
2.4 進入fontawesome-free-5.0.13\web-fonts-with-css\webfonts 選中fa-solid-900.ttf

fa-solid-900.ttf
2.5 上傳完成后,按下圖配置后,點擊轉(zhuǎn)換即可

配置轉(zhuǎn)換
2.6 轉(zhuǎn)換完成,點擊下載

轉(zhuǎn)換完成
2.7 解壓,選擇stylesheet.css文件

選擇stylesheet.css文件
2.8 將改文件重命名為: font-awesome.wxss
@import "/assets/css/icon/font-awesome.wxss";
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
/*增加`fa`樣式*/
.fa {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
}
復制代碼
|
<text class="fa fa-user"></text> 復制代碼

demo
.fa-picture-o:before {
content: "\f03e";
}
|