--- license: > Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. title: 圖示和啟動畫面 toc_title: 自定义图标 --- # 圖示和啟動畫面 這一節演示如何配置應用程式的圖示和可選初始螢幕上的各種平臺上,兩者在科爾多瓦 CLI (描述在命令列介面) 中工作時或使用特定于平臺 SDK 工具 (平臺指南中詳細說明)。 ## 在 CLI 中配置圖示 當工作在 CLI 中你可以定義應用程式圖示通過 `` 元素 ( `config.xml` )。如果你不指定一個圖示然後使用 Apache 科爾多瓦徽標。 src: (必填) 指定的影像檔,與您的專案目錄的位置 平臺: (可選) 目標平臺 寬度: (可選) 圖示的寬度 (以圖元為單位) 高度: (可選) 圖示的高度 (以圖元為單位) 密度: (可選) android 具體,指定圖示密度 下面的配置可以用於定義單個預設圖示,將用於所有平臺。 為每個平臺還可以定義設置以適合不同的螢幕解析度圖元完美圖示。 亞馬遜火 OS Android 系統 BlackBerry10 請參閱針對多個大小和地區設定黑莓的文檔。[] HTTP://developer.blackberry.com/html5/documentation/icon_element.html 火狐瀏覽器作業系統 iOS Tizen Windows Phone8 Windows8 ## 在 CLI 中配置初始螢幕 在頂級 `config.xml` 檔 (不是在一個 `platforms` ),添加像那些在此指定的配置元素。 # 配置示例 請注意"src"屬性的值是相對於專案目錄而不是 www 目錄。 你可以命名源映射任何你喜歡的。 在應用程式中的內部名稱取決於科爾多瓦。 # 支援的平臺 到目前為止 (科爾多瓦 3.5.0 7 月 2014年) 以下平臺支援的閃屏。 android ios wp8 windows8 blackberry10 # 閃屏外掛程式 Apache 科爾多瓦還提供特殊飛濺螢幕外掛程式,它可以用來以程式設計方式顯示和隱藏在應用程式啟動 HTTPs://github.com/apache/cordova-plugin-splashscreen 期間的初始螢幕