当前位置:网站首页>Use Alibaba icon in uniapp
Use Alibaba icon in uniapp
2022-07-06 08:05:00 【So Lanxun】
List of articles
Preface
In the use of uniapp In the process of developing the project , The use of icons can be said to be daily operations , Even 80% of the pages will use , And if you use ui Frame words , The frame itself will also have its own icon , However, these icons are difficult to meet the demand , The following is the use of Alibaba icon .
Find the icon you need

- Add the icons you need to use to the shopping cart or collect them
- Click on the shopping cart icon in the upper right corner , Add the selected icon to the project
- You need to log in , You can baidu yourself
Download to local

After downloading to local

- You can click on the
demo_index.htmlsee , There are ways to use .
Page usage
Copy all the downloaded files into the project , It is recommended to put it in the folder static/iconfont Next , You can copy all , You can also copy only iconfont.css and iconfont.ttf Two documents .
To create local css file
- stay
common/cssCreate under filefont-icon.cssfile , This is to configure and reference Alibaba's icon , The code is as follows : - hold iconfont.css Copy the contents of this file , Copy .iconfont The following style is enough , The above introduction does not need to be copied .
- Some friends may need to add
https, But now the authorities have handled it , So there's no need to , If you can't visit, please add at last .
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src:url('[email protected]/static/iconfont/iconfont.ttf') format('truetype');
}
.icon {
color: #999;
font-family: uniicons;
font-size: 42upx;
font-weight: normal;
font-style: normal;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
}
// The following , hold iconfont.css Copy the contents in , Copy .iconfont The following style is enough .
app.vue Introduction in

Page using
demo_index.htmlThere are corresponding icons in- Use... In the page
demo_index.htmlInside classiconfontSwitch toiconthat will do , Because you arefont-icon.cssThe definition is called this , In order to distinguish, you can also use the same or customized name .
<span class="icon"></span>
<span class="icon icon-xxx"></span>
Used in the navigation bar
- Select the icon , Download to local without creating css File to introduce , It can be used directly .
- The use of the navigation bar is the same , Follow uniapp Just come to the official website .
- But the online part is also added to the introduction
https, That should be the previous version , Not now , Debug and use according to normal steps , Finally, it can't be used , Try addinghttpsThe way to . - In the code
textValue , staydemo_index.htmlCan be found in , Replace the previous symbol with\uthat will do , Remember that there is no semicolon behind
"app-plus": {
"titleNView": {
"buttons": [{
"text": "\ue600",
"fontSrc": "/static/iconfont/iconfont.ttf",
"float": "right",
"key": 1
},
{
"text": "\ue648",
"fontSrc": "/static/iconfont/iconfont.ttf",
"float": "right",
"key": 2
}
]
}
}
Summary
- Although the article is long , It's not as simple as others , However, the use process is like this , It is also convenient for you to customize various icons
- How to use it , In fact, there are official websites , Please note that the development is still based on the official
- This article is to guide and comb , There are many ways , If you think it is applicable
边栏推荐
- Common functions for PHP to process strings
- MySQL view tablespace and create table statements
- Onie supports pice hard disk
- How to use information mechanism to realize process mutual exclusion, process synchronization and precursor relationship
- Risk planning and identification of Oracle project management system
- 数据治理:数据质量篇
- 数据治理:微服务架构下的数据治理
- 远程存储访问授权
- 让学指针变得更简单(三)
- NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
猜你喜欢

esRally国内安装使用避坑指南-全网最新

Asia Pacific Financial Media | female pattern ladyvision: forced the hotel to upgrade security. The drunk woman died in the guest room, and the hotel was sentenced not to pay compensation | APEC secur

Esrally domestic installation and use pit avoidance Guide - the latest in the whole network

Golang DNS 随便写写
![DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist](/img/17/415e66d67afb055e94a966de25c2bc.png)
DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist

Codeforces Global Round 19(A~D)

It's hard to find a job when the industry is in recession

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

【云原生】手把手教你搭建ferry开源工单系统

Make learning pointer easier (3)
随机推荐
你想知道的ArrayList知识都在这
数据治理:数据质量篇
Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
远程存储访问授权
Common functions for PHP to process strings
Migrate data from SQL files to tidb
Flash return file download
Understanding of law of large numbers and central limit theorem
How to use information mechanism to realize process mutual exclusion, process synchronization and precursor relationship
ESP系列引脚說明圖匯總
JS select all and tab bar switching, simple comments
Yu Xia looks at win system kernel -- message mechanism
P3047 [usaco12feb]nearby cows g (tree DP)
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
数据治理:元数据管理篇
The Vice Minister of the Ministry of industry and information technology of "APEC industry +" of the national economic and information technology center led a team to Sichuan to investigate the operat
Pangolin Library: control panel, control components, shortcut key settings
[KMP] template
[Yugong series] February 2022 U3D full stack class 011 unity section 1 mind map
Parameter self-tuning of relay feedback PID controller