当前位置:网站首页>Uniapp uses the Ali Icon

Uniapp uses the Ali Icon

2022-06-12 18:45:00 BackgroundHero

Select your favorite Icon and click Add to stock in
 Insert picture description here
Find the shopping pattern in the upper right corner , Click on , Add the selected icon to the project
 Insert picture description here
 Insert picture description here

Jump to the project after adding
Click download to local
 Insert picture description here
Find after unzipping iconfont.css file , Copied to the uniapp In the project
 Insert picture description here
 Insert picture description here
stay App.vue Import public styles in ( That is, the font icon style just imported iconfont.css)
 Insert picture description here

 Insert picture description here

There are many ways to write
 Insert picture description here
Personal test , These three ways of writing support

Then go back to the Ali icon
Click Copy code
 Insert picture description here
Then open the iconfont.css
Replace the contents of the first paragraph with the copied code
 Insert picture description here
Then you can use the Ali icon in the page
The icon can be used as a font to set the size

<text class="iconfont iconfengzheng" style="font-size: 200px;"></text>

 Insert picture description here
The effect is as shown in the picture
 Insert picture description here

Add :
Still need to be in iconfont.css in , Add... To the front of all the links inside https:
 Insert picture description here
This was discovered later
The icon will not be displayed when the project is packaged and run on the mobile phone
I don't know why
Blind guessing may be due to the restrictions of the Android system, which does not allow access to non https link

原网站

版权声明
本文为[BackgroundHero]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121839558474.html