当前位置:网站首页>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.html
see , 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/css
Create under filefont-icon.css
file , 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.html
There are corresponding icons in- Use... In the page
demo_index.html
Inside classiconfont
Switch toicon
that will do , Because you arefont-icon.css
The 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 addinghttps
The way to . - In the code
text
Value , staydemo_index.html
Can be found in , Replace the previous symbol with\u
that 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
边栏推荐
- MES, APS and ERP are essential to realize fine production
- Vit (vision transformer) principle and code elaboration
- PHP - Common magic method (nanny level teaching)
- Analysis of Top1 accuracy and top5 accuracy examples
- Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
- Step by step guide to setting NFT as an ens profile Avatar
- Risk planning and identification of Oracle project management system
- [research materials] 2021 live broadcast annual data report of e-commerce - Download attached
- The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
- Sanzi chess (C language)
猜你喜欢
让学指针变得更简单(三)
Interview Reply of Zhuhai Jinshan
【云原生】手把手教你搭建ferry开源工单系统
"Designer universe" APEC design +: the list of winners of the Paris Design Award in France was recently announced. The winners of "Changsha world center Damei mansion" were awarded by the national eco
Pyqt5 development tips - obtain Manhattan distance between coordinates
Qualitative risk analysis of Oracle project management system
The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
File upload of DVWA range
Step by step guide to setting NFT as an ens profile Avatar
Make learning pointer easier (3)
随机推荐
Step by step guide to setting NFT as an ens profile Avatar
flask返回文件下载
使用 TiUP 升级 TiDB
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
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
Convolution, pooling, activation function, initialization, normalization, regularization, learning rate - Summary of deep learning foundation
Risk planning and identification of Oracle project management system
Migrate data from a tidb cluster to another tidb cluster
Upgrade tidb with tiup
23. Update data
面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio
Common functions for PHP to process strings
1. Color inversion, logarithmic transformation, gamma transformation source code - miniopencv from zero
ESP系列引脚说明图汇总
[nonlinear control theory]9_ A series of lectures on nonlinear control theory
shu mei pai
Codeforces Global Round 19(A~D)
"Designer universe" APEC design +: the list of winners of the Paris Design Award in France was recently announced. The winners of "Changsha world center Damei mansion" were awarded by the national eco
从 CSV 文件迁移数据到 TiDB