1# 配置分层图标
2
3应用图标如果采用分层图标(包括前景图和背景图两层),可以参考本章节进行配置。图标规范详见<!--RP1-->[图标交付](https://docs.openharmony.cn/pages/v5.0/zh-cn/design/ux-design/visual-app-icons.md#%E5%9B%BE%E6%A0%87%E4%BA%A4%E4%BB%98)<!--RP1End-->。
4
5## 配置步骤
61. 将前景资源和背景资源文件放在“AppScope\resources\base\media”文件下。
7   本例中采用的前景资源和背景资源的文件名分别为“foreground.png”和"background.png"。
82. 在“AppScope\resources\base\media”文件夹下创建layered_image.json文件,并在该文件中配置分层图标的前景资源与背景资源信息。
9    ```json
10    {
11      "layered-image":
12      {
13        "background" : "$media:background",
14        "foreground" : "$media:foreground"
15      }
16    }
17    ```
183. 在app.json5配置文件中引用分层图标资源文件。示例如下:
19     ```json
20        {
21          "app": {
22            "icon": "$media:layered_image",
23            // ...
24          }
25        }
26    ```
27
28