当前位置:网站首页>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
边栏推荐
- 图像融合--挑战、机遇与对策
- What is the use of entering the critical point? How to realize STM32 single chip microcomputer?
- Interview Reply of Zhuhai Jinshan
- Pyqt5 development tips - obtain Manhattan distance between coordinates
- IP lab, the first weekly recheck
- On why we should program for all
- 使用 Dumpling 备份 TiDB 集群数据到兼容 S3 的存储
- Parameter self-tuning of relay feedback PID controller
- Entity class design for calculating age based on birthday
- Oracle time display adjustment
猜你喜欢
Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
ROS learning (IX): referencing custom message types in header files
Step by step guide to setting NFT as an ens profile Avatar
wincc7.5下载安装教程(Win10系统)
Sanzi chess (C language)
Leetcode question brushing record | 203_ Remove linked list elements
C语言 - 位段
861. Score after flipping the matrix
21. Delete data
A Closer Look at How Fine-tuning Changes BERT
随机推荐
MFC 给列表控件发送左键单击、双击、以及右键单击消息
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
将 NFT 设置为 ENS 个人资料头像的分步指南
Understanding of law of large numbers and central limit theorem
Common functions for PHP to process strings
好用的TCP-UDP_debug工具下载和使用
861. Score after flipping the matrix
A Closer Look at How Fine-tuning Changes BERT
NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
使用 BR 恢复 S3 兼容存储上的备份数据
onie支持pice硬盘
2.10transfrom attribute
A Closer Look at How Fine-tuning Changes BERT
"Friendship and righteousness" of the center for national economy and information technology: China's friendship wine - the "unparalleled loyalty and righteousness" of the solidarity group released th
Epoll and IO multiplexing of redis
Pangolin Library: control panel, control components, shortcut key settings
24. Query table data (basic)
Data governance: data quality
Position() function in XPath uses
PHP - Common magic method (nanny level teaching)