適用於 HTML 中網站的 Apple 觸控圖示


對於 iPhone 或 iPad 上的網頁圖示,請使用 Apple Touch Icon 或 apple-touch-icon.png 檔案。當有人將你的網頁新增為書籤時,此圖示將會使用。

針對使用不同裝置解析度(例如 iPhone 或 iPad)的多個圖示,請按照如下內容將 size 屬性新增到每個 link 元素:-

<link rel = "apple-touch-icon" href = "touch-icon-iphone.png">

設定大小

<link rel = "apple-touch-icon" sizes = "160x160" href = "touch-icon-ipad.png">
<link rel = "apple-touch-icon" sizes = "170x170" href = "touch-icon-iphone-retina.png">
<link rel = "apple-touch-icon" sizes = "180x180" href = "touch-icon-ipad-retina.png">

會使用與裝置大小相匹配的圖示。

更新於:2020-06-24

2K+ 瀏覽量

開啟你的 職業

完成課程,獲得認證

開始學習
廣告
© . All rights reserved.