在 iPhone「添加到主屏幕」时显示自定义图标

测试资源下载:https://github.com/dragon8github/mobile-boilerplate/tree/master/img/touch

doctype html>
<html>
  <head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        <link rel="apple-touch-icon-precomposed" sizes="180x180" href="img/touch/apple-touch-icon-180x180-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="img/touch/apple-touch-icon-152x152-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/touch/apple-touch-icon-144x144-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="120x120" href="img/touch/apple-touch-icon-120x120-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/touch/apple-touch-icon-114x114-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="76x76" href="img/touch/apple-touch-icon-76x76-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/touch/apple-touch-icon-72x72-precomposed.png">
        
        <link rel="apple-touch-icon-precomposed" href="img/touch/apple-touch-icon-57x57-precomposed.png">
        
        <link rel="shortcut icon" href="img/touch/apple-touch-icon.png">
        
        
        <meta name="apple-mobile-web-app-capable" content="yes">
        
        <meta name="mobile-web-app-capable" content="yes">
  head>
  <body>
  body>
html>

 

效果演示(Safari浏览器才支持【添加到主屏幕】,坑爹的UC浏览器不支持):

在桌面显示的是自定义的ICO图标

 由于加入了

 所以通过桌面启动的网站是全屏显示的(隐藏了浏览器的地址栏和工具栏,加载状态栏等)