Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
unidocs-uni-app-x-zh
提交
780ddbd4
U
unidocs-uni-app-x-zh
项目概览
DCloud
/
unidocs-uni-app-x-zh
通知
144
Star
2
Fork
33
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
9
列表
看板
标记
里程碑
合并请求
11
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
unidocs-uni-app-x-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
9
Issue
9
列表
看板
标记
里程碑
合并请求
11
合并请求
11
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
780ddbd4
编写于
11月 09, 2024
作者:
DCloud-yyl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
补充uni-icon文档
上级
48e1a770
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
184 addition
and
0 deletion
+184
-0
docs/css/common/at-rules.md
docs/css/common/at-rules.md
+184
-0
未找到文件。
docs/css/common/at-rules.md
浏览文件 @
780ddbd4
...
...
@@ -2,6 +2,8 @@
<!-- CSSJSON.at_rules_values.compatibility -->
## 字体
@font-face自定义字体示例:
```
html
<style>
...
...
@@ -12,5 +14,187 @@
</style>
```
### 内置字体图标 uni-icon @uniicon
> HBuilderX4.33版本开始 app-android、app-ios平台支持内置字体图标 uni-icon
内置
`uni-icon`
字体图标示例:
```
html
<template>
<!-- #ifdef APP -->
<scroll-view
style=
"flex: 1;"
>
<!-- #endif -->
<text
style=
"font-family: uni-icon;font-size: 64px;"
>
{{uniIcon}}
</text>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script
lang=
"uts"
>
export
default
{
data
()
{
return
{
uniIcon
:
'
\
ue605
'
}
}
}
</script>
```
内置
`uni-icon`
包括以下图标:
<div
class=
"iconSample"
>
<div
class=
"iconContainer"
>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E600
</span>
<span
class=
"name"
>
forward
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E601
</span>
<span
class=
"name"
>
back
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E602
</span>
<span
class=
"name"
>
share
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E604
</span>
<span
class=
"name"
>
favorites
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E605
</span>
<span
class=
"name"
>
home
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E606
</span>
<span
class=
"name"
>
more
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E650
</span>
<span
class=
"name"
>
close
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
E661
</span>
<span
class=
"name"
>
down
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA01
</span>
<span
class=
"name"
>
circle
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA03
</span>
<span
class=
"name"
>
info
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA04
</span>
<span
class=
"name"
>
info circle
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA06
</span>
<span
class=
"name"
>
success
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA07
</span>
<span
class=
"name"
>
success circle
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA08
</span>
<span
class=
"name"
>
success no circle
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA0B
</span>
<span
class=
"name"
>
cancel circle
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA0F
</span>
<span
class=
"name"
>
warn
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA14
</span>
<span
class=
"name"
>
clear
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA19
</span>
<span
class=
"name"
>
download
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA1E
</span>
<span
class=
"name"
>
waiting
</span>
</div>
<div
class=
"iconItem"
>
<span
class=
"icon"
>

</span>
<span
class=
"code"
>
\u
EA23
</span>
<span
class=
"name"
>
search
</span>
</div>
</div>
</div>
## Tips
-
`字体路径`
支持
**网络**
和
**本地**
,本地字体请注意放在项目或uni_modules的static目录下。
<style
type=
"text/css"
>
@font-face {
font-family: 'uni-icon';
src: url(data:font/ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMhIACicAAACsAAAAYGNtYXBJB47VAAABDAAAAapnbHlm8llk8QAAArgAAAtEaGVhZCj1NF4AAA38AAAANmhoZWEHlQPxAAAONAAAACRobXR4DXMFkwAADlgAAAAybG9jYR7QHCgAAA6MAAAALm1heHABMgCPAAAOvAAAACBuYW1lne94ygAADtwAAAFlcG9zdHgRyWUAABBEAAAA7QAEA9oBkAAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAUAAIOojA8D/wABAA8AAQAAAAAEAAAAAAgACzQAAACA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GRvd24GY2lyY2xlBGluZm8KaW5mb2NpcmNsZQdzdWNjZXNzDXN1Y2Nlc3NjaXJjbGUPc3VjY2Vzc25vY2lyY2xlDGNhbmNlbGNpcmNsZQR3YXJuBWNsZWFyCGRvd25sb2FkB3dhaXRpbmcGc2VhcmNoAAAA) format('truetype');
}
.iconSample {
background-color: #f8f8f8;
}
.iconContainer {
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
display: flex;
}
.iconItem {
width: 100px;
height: 150px;
align-items: center;
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
}
.icon {
width: 48px;
height: 48px;
font-family: uni-icon;
font-size: 42px;
line-height: 48px;
color: #333;
margin-bottom: 8px;
display: block;
}
.code {
font-size: 14px;
color: #f00;
display: block;
}
.name {
font-size: 12px;
color: #000;
display: block;
}
</style>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录