{"id":101358,"date":"2021-09-01T08:23:52","date_gmt":"2021-09-01T00:23:52","guid":{"rendered":"https:\/\/www.keaglegz.com\/101358.html"},"modified":"2026-06-30T17:09:38","modified_gmt":"2026-06-30T09:09:38","slug":"%e4%b8%baios%e8%ae%be%e8%ae%a1%e7%b1%bb%e4%bc%bc%e5%8e%9f%e7%94%9f%e7%9a%84progressive-web-apps%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/www.dongwubaike.cn\/fanhao\/101358.html","title":{"rendered":"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/7a3f7c7f2da77f94c46f6988927a78a9.png\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/7a3f7c7f2da77f94c46f6988927a78a9.png\" width=\"1400\" height=\"733\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> Progressive Web APP\u5e94\u7528\u7a0b\u5e8f(PWA)\u7684\u4e3b\u8981\u7279\u5f81\u4e4b\u4e00\u662f\u5e94\u7528\u7a0b\u5e8f\u76f8\u4f3c\u6027\u3002\u5c3d\u7ba1\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u5728\u6280\u672f\u4e0a\u662f\u5728Web\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\u7684\uff0c\u4f46\u60a8\u5e94\u8be5\u52aa\u529b\u4f7f\u5176\u770b\u8d77\u6765\u548c\u611f\u89c9\u4e0a\u4e0e\u672c\u673a\u5e94\u7528\u7a0b\u5e8f\u4e00\u6837\u597d\u3002\u8fd9\u5305\u62ec\u4f7f\u5176\u53ef\u5b89\u88c5\u5728\u4e3b\u5c4f\u5e55\u4e0a\u3001\u6dfb\u52a0\u81ea\u5b9a\u4e49\u56fe\u6807\u3001\u7981\u7528\u5730\u5740\u680f\u7b49\u3002\u4e0eAndroid\u4e0d\u540c\uff0cWeb App Manifest\u4f1a\u81ea\u52a8\u4e3a\u5176\u751f\u6210\u8bb8\u591a\u7c7b\u4f3c\u672c\u673a\u7684\u529f\u80fd\uff0c\u800ciOS\u9700\u8981\u4e00\u4e9b\u989d\u5916\u7684HTML\u548cCSS\u6280\u5de7\u3002\u8fd9\u91cc\u6709\u4e03\u4e2a\u5173\u4e8e\u5982\u4f55\u8ba9\u4f60\u7684PWA\u5728iOS\u4e0a\u66f4\u50cf\u539f\u751f\u7684\u5efa\u8bae\u3002<\/p>\n<h2>1. \u4f7f\u5176\u72ec\u7acb<\/h2>\n<p>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u8ba9\u4f60\u7684PWA\u4f5c\u4e3a\u72ec\u7acb\u5e94\u7528\u7a0b\u5e8f\u5728iOS\u4e0a\u8fd0\u884c\uff08\u5373\uff0c\u5728\u6ca1\u6709Web\u6d4f\u89c8\u5668UI\u63a7\u4ef6\u7684\u65b0\u7a97\u53e3\u4e2d\u8fd0\u884c\uff09\u3002\u7b2c\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528<code>apple-mobile-web-app-capable<\/code>\u4ee5\u4e0b\u4ee3\u7801\u5728HTML\u4ee3\u7801\u7684head\u5143\u7d20\u4e2d\u4f7f\u7528\u5143\u6807\u8bb0\u3002<\/p>\n<pre>&lt;meta name=\"apple-mobile-web-app-capable\" content=\"yes\"&gt;<\/pre>\n<p>\u7b2c\u4e8c\u79cd\u65b9\u6cd5\u662f\u5c06<code>displayWeb App Manifest<\/code>\u7684\u5c5e\u6027\u8bbe\u7f6e\u4e3a<code>standalone<\/code>. \u4e00\u4e2a\u793a\u4f8b Web \u5e94\u7528\u7a0b\u5e8f\u6e05\u5355\u53ef\u80fd\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<pre>{      \"name\": \"Appscope\",      \"display\": \"standalone\",      \"icons\": [{         \"src\": \"icons\/icon-192.png\",         \"sizes\": \"192x192\"},      {         \"src\" : \"icons\/icon-512.png\",         \"sizes\": \"512x512\"}      ]   }<\/pre>\n<h2>2.\u6dfb\u52a0\u81ea\u5b9a\u4e49\u56fe\u6807<\/h2>\n<p>\u4e0d\u5e78\u7684\u662f\uff0ciOS\u4e0d\u4f7f\u7528Web App Manifest\u4e2d\u6307\u5b9a\u7684\u56fe\u6807\u3002\u76f8\u53cd\uff0c\u8981\u4e3a\u5e94\u7528\u7684\u6240\u6709\u9875\u9762\u4f7f\u7528\u81ea\u5b9a\u4e49\u56fe\u6807\uff0c\u60a8\u5fc5\u987b\u63d0\u4f9bPNG\u683c\u5f0f\u7684\u56fe\u6807\uff0c\u5e76<code>apple-touch-icon.png<\/code>\u5728PWA\u7684\u6839\u6587\u6863\u6587\u4ef6\u5939\u4e2d\u63d0\u4f9b\u540d\u79f0\u3002<br \/> \u5982\u679c\u8981\u4e3a\u5e94\u7528\u7684\u5355\u4e2a\u9875\u9762\u6dfb\u52a0\u7279\u5b9a\u56fe\u6807\uff0c\u8bf7\u5728HTML\u4ee3\u7801\u7684head\u5143\u7d20\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u884c\u3002<\/p>\n<pre>&lt;link rel=\"apple-touch-icon\" href=\"single-page-icon.png\"&gt;  <\/pre>\n<p>\u4e0d\u540c\u7684iOS\u8bbe\u5907\u4f7f\u7528\u4e0d\u540c\u5927\u5c0f\u7684\u4e3b\u5c4f\u5e55\u56fe\u6807\u3002\u8981\u4e3a\u7279\u5b9a\u5927\u5c0f\u6307\u5b9a\u56fe\u6807\uff0c\u8bf7\u4f7f\u7528<code>sizes<\/code>\u94fe\u63a5\u5143\u7d20\u7684\u5c5e\u6027\u3002\u5982\u679c\u8bbe\u5907\u7684\u63a8\u8350\u56fe\u6807\u5c3a\u5bf8\u6ca1\u6709\u6307\u5b9a\u56fe\u6807\uff0c\u5219\u4f7f\u7528\u6bd4\u63a8\u8350\u5c3a\u5bf8\u5927\u7684\u6700\u5c0f\u5c3a\u5bf8\u7684\u56fe\u6807\u3002<br \/> \u4ee5\u4e0b\u793a\u4f8b\u4e3a\u6700\u5e38\u89c1\u7684iOS\u8bbe\u5907\u6307\u5b9a\u4e86\u5c3a\u5bf8\uff0c\u6765\u81eaApple\u7684Safari Web\u5185\u5bb9\u6307\u5357\u3002<\/p>\n<pre>&lt;link rel=\"apple-touch-icon\" href=\"touch-icon-iphone.png\"&gt;   &lt;link rel=\"apple-touch-icon\" size=\"152x152\" href=\"touch-icon-ipad.png\" &gt;   &lt;link rel=\"apple-touch-icon\" size=\"180x180\" href=\"touch-icon-iphone-retina.png\"&gt;   &lt;link rel=\"apple-touch-icon\" size=\"167x167\" href=\" touch-icon-ipad-retina.png\"&gt;  <\/pre>\n<p>\u56de\u60f3\u4e00\u4e0b\uff0ciOS\u9700\u8981\u4e0d\u900f\u660e\u7684\u56fe\u6807\u3002\u56fe\u6807\u7684\u4efb\u4f55\u900f\u660e\u90e8\u5206\u90fd\u5c06\u53d8\u4e3a\u9ed1\u8272\u3002<\/p>\n<h2>3.\u6dfb\u52a0\u81ea\u5b9a\u4e49\u542f\u52a8\u753b\u9762<\/h2>\n<p><a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2024\/05\/hoade23524223233.jpg\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2024\/05\/hoade23524223233.jpg\" width=\"300\" height=\"650\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u8ba9\u4f60\u7684\u6e10\u8fdb\u5f0fWeb\u5e94\u7528\u7a0b\u5e8f\u66f4\u50cf\u539f\u751f\u7684\u4e0b\u4e00\u6b65\u662f\u7528\u4f60\u81ea\u5df1\u7684\u56fe\u50cf\u66ff\u6362\u6c89\u95f7\u7684\u767d\u8272\u542f\u52a8\u5c4f\u5e55\u3002\u8981\u6dfb\u52a0\u81ea\u5b9a\u4e49\u542f\u52a8\u753b\u9762\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u94fe\u63a5\u5143\u7d20\u3002<\/p>\n<pre>&lt;link rel=\"apple-touch-startup-image\" href=\"launch.png\"&gt;<\/pre>\n<p>\u4e3a\u4e86\u663e\u793a\u6b64\u56fe\u50cf\uff0c\u91cd\u8981\u7684\u662f\u5176\u5c3a\u5bf8\u4e0e\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u7684\u8bbe\u5907\u7684\u5c3a\u5bf8\u76f8\u540c\u3002\u4f8b\u5982\uff0c\u8981\u5728iPhone X\u4e0a\u5de5\u4f5c\uff0c<code>launch.png<\/code>\u5c3a\u5bf8\u5fc5\u987b\u4e3a1125 x 2436\u50cf\u7d20\u3002\u8fd9\u91cc\u51fa\u73b0\u7684\u95ee\u9898\u662f\uff0c\u6709\u591a\u4e2a\u4e0d\u540c\u5206\u8fa8\u7387\u7684iOS\u8bbe\u5907\uff0c\u4e0d\u5e78\u7684\u662f\uff0c\u6211\u4eec\u4e0d\u80fd\u7b80\u5355\u5730\u4e3a\u4e0d\u540c\u5927\u5c0f\u7684\u56fe\u50cf\u591a\u6b21\u91cd\u590d\u6b64\u4ee3\u7801\u3002\u76f8\u53cd\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u8be5media\u5c5e\u6027\u6765\u6307\u5b9a\u54ea\u4e2a\u542f\u52a8\u56fe\u50cf\u9002\u7528\u4e8e\u54ea\u4e2a\u8bbe\u5907\u3002<br \/> \u5c06\u4ee5\u4e0b\u4ee3\u7801\u6dfb\u52a0\u5230PWA\u7684head\u5143\u7d20\u4ee5\u652f\u6301\u4e0d\u540ciOS\u8bbe\u5907\u7684\u81ea\u5b9a\u4e49\u542f\u52a8\u753b\u9762\u3002<\/p>\n<pre>&lt;!-- iPhone Xs Max (1242px x 2688px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)&quot; href=&quot;\/apple-launch-1242x2688.png&quot;&gt;  &lt;!-- iPhone Xr (828px x 1792px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-828x1792.png&quot;&gt;  &lt;!-- iPhone X, Xs (1125px x 2436px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)&quot; href=&quot;\/apple-launch-1125x2436.png&quot;&gt;  &lt;!-- iPhone 8 Plus, 7 Plus, 6s Plus, 6 Plus (1242px x 2208px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)&quot; href=&quot;\/apple-launch-1242x2208.png&quot;&gt;  &lt;!-- iPhone 8, 7, 6s, 6 (750px x 1334px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-750x1334.png&quot;&gt;  &lt;!-- iPad Pro 12.9&quot; (2048px x 2732px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-2048x2732.png&quot;&gt;  &lt;!-- iPad Pro 11\u201d (1668px x 2388px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-1668x2388.png&quot;&gt;  &lt;!-- iPad Pro 10.5&quot; (1668px x 2224px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-1668x2224.png&quot;&gt;  &lt;!-- iPad Mini, Air (1536px x 2048px) --&gt;   &lt;link rel=&quot;apple-touch-startup-image&quot; media=&quot;(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)&quot; href=&quot;\/apple-launch-1536x2048.png&quot;&gt;<\/pre>\n<p>\u5982\u679c\u60a8\u9700\u8981\u5e2e\u52a9\u4e3aPWA\u8bbe\u7f6e\u542f\u52a8\u753b\u9762\uff0c\u8bf7\u67e5\u770bAppscope\u4e0a\u7684\u542f\u52a8\u753b\u9762\u751f\u6210\u5668\u3002<\/p>\n<h2>4.\u66f4\u6539\u72b6\u6001\u680f<\/h2>\n<p><a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/7848b36a8ec740e966060e3af7d8dbbb.png\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/7848b36a8ec740e966060e3af7d8dbbb.png\" width=\"700\" height=\"287\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u60a8\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49PWA\u7684iOS\u72b6\u6001\u680f\uff08\u5c4f\u5e55\u4e0a\u8fb9\u7f18\u663e\u793a\u65f6\u95f4\u548c\u7535\u6c60\u72b6\u6001\u7684\u533a\u57df\uff09\u3002\u4e3a\u6b64\uff0c\u60a8\u5fc5\u987b\u5728<code>apple-mobile-web-app-status-bar-style<\/code>\u4ee3\u7801\u7684head\u5143\u7d20\u4e2d\u4f7f\u7528\u5143\u6807\u8bb0\u3002<\/p>\n<pre>&lt;meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\"&gt;<\/pre>\n<p>\u4e0d\u5e78\u7684\u662f\uff0c\u81ea\u5b9a\u4e49\u72b6\u6001\u680f\u7684\u65b9\u6cd5\u6570\u91cf\u76f8\u5f53\u6709\u9650\uff0c\u4f46Apple\u4e3a\u8be5<code>content<\/code>\u5c5e\u6027\u63d0\u4f9b\u4e86\u4e09\u79cd\u4e0d\u540c\u7684\u8bbe\u7f6e\u3002<\/p>\n<ul>\n<li><code>default<\/code>\u5bfc\u81f4\u5e26\u6709\u9ed1\u8272\u6587\u672c\u548c\u7b26\u53f7\u7684\u767d\u8272\u72b6\u6001\u680f\u3002<\/li>\n<li><code>black<\/code>\u5bfc\u81f4\u9ed1\u8272\u72b6\u6001\u680f\u548c\u9ed1\u8272\u6587\u672c\u548c\u7b26\u53f7\uff0c\u4f7f\u5176\u663e\u793a\u4e3a\u5b8c\u5168\u9ed1\u8272\u3002\u5982\u679c\u60a8\u4e0d\u4f7f\u7528\u72b6\u6001\u680f\u5143\u6807\u8bb0\uff0c\u8fd9\u5c31\u662f\u72b6\u6001\u680f\u7684\u5916\u89c2\u3002<\/li>\n<li><code>black-translucent<\/code>\u7ed3\u679c\u662f\u767d\u8272\u6587\u672c\u548c\u7b26\u53f7\uff0c\u72b6\u6001\u680f\u5c06\u91c7\u7528\u4e0e\u60a8\u7684 Web \u5e94\u7528\u7a0b\u5e8f\u7684\u6b63\u6587\u5143\u7d20\u76f8\u540c\u7684\u80cc\u666f\u989c\u8272\u3002<\/li>\n<\/ul>\n<h2>5.\u7ed9\u5b83\u4e00\u4e2a\u7b80\u77ed\u7684\u540d\u5b57<\/h2>\n<p>PWA\u7684\u6807\u9898\u5c06\u663e\u793a\u5728\u4e3b\u5c4f\u5e55\u4e0a\u7684\u542f\u52a8\u56fe\u6807\u4e0b\u65b9\u3002\u4e3a\u907f\u514d\u622a\u65ad\uff0c\u6b64\u6807\u9898\u4e0d\u5e94\u8d85\u8fc712\u4e2a\u5b57\u7b26\uff0c\u5c3d\u7ba1\u6700\u7ec8\u5f52\u7ed3\u4e3a\u6240\u7528\u5b57\u7b26\u7684\u5bbd\u5ea6\uff08\u4f8b\u5982\uff0c\u5b57\u6bcdw\u6bd4\u5b57\u6bcdi\u5bbd\u3002\uff09\u5982\u679c\u60a8\u7684PWA\u7684\u539f\u59cb\u540d\u79f0\u4e0d\u9002\u5408\u5728\u56fe\u6807\u4e0b\u65b9\uff0c\u60a8\u53ef\u4ee5\u6307\u5b9a\u540d\u79f0\u7684\u7b80\u77ed\u7248\u672c\u3002<br \/> \u4e3a PWA \u6307\u5b9a\u77ed\u540d\u79f0\u7684\u4e00\u79cd\u65b9\u6cd5\u662f\u5728<code>apple-mobile-web-app-title<\/code>\u4ee3\u7801\u7684head\u5143\u7d20\u4e2d\u4f7f\u7528\u5e26\u6709\u4ee5\u4e0b\u884c\u7684\u5143\u6807\u8bb0\u3002<\/p>\n<pre>&lt;meta name=&quot;apple-mobile-web-app-title&quot; content=&quot;Appscope&quot;&gt;<\/pre>\n<p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f<code>short_name<\/code>\u5728Web App Manifest\u4e2d\u4f7f\u7528\u8be5\u5c5e\u6027\u3002\u4e00\u4e2a\u793a\u4f8bWeb\u5e94\u7528\u7a0b\u5e8f\u6e05\u5355\u53ef\u80fd\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<pre>{      \"name\": \"Little Alchemy 2\",      \"short_name\": \"Alchemy 2\",      \"icons\": [{         \"src\": \"\/public\/icons\/icon-192x192.png\",         \"sizes\": \"192x192\" },       {         \"src\": \"\/public\/icons\/icon-512x512.png\",         \"sizes\": \"512x512\"}      ]   }<\/pre>\n<h2>6. \u7981\u7528\u9009\u62e9\u3001\u7a81\u51fa\u663e\u793a\u548c\u6807\u6ce8<\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0ciOS Web\u6d4f\u89c8\u5668\u4e3a\u6587\u672c\u548c\u94fe\u63a5\u6dfb\u52a0\u4e86\u67d0\u4e9b\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u6ca1\u6709\u7684\u4ea4\u4e92\u6548\u679c\u3002\u56e0\u6b64\uff0c\u4e3a\u4e86\u8ba9\u4f60\u7684PWA\u611f\u89c9\u66f4\u50cf\u539f\u751f\u2014\u2014\u800c\u4e0d\u662f\u50cf\u7f51\u7ad9\u6216\u6587\u6863\u2014\u2014\u4f60\u53ef\u4ee5\u7981\u7528\uff08\u6216\u81f3\u5c11\u90e8\u5206\u7981\u7528\uff09\u8fd9\u4e9b\u6548\u679c\u3002\u4ee5\u4e0b\u5c0f\u8282\u9488\u5bf9\u4e09\u79cd\u6700\u5e38\u89c1\u7684\u6548\u679c\u7c7b\u578b\u3002<br \/> <strong>6.1 \u7981\u7528\u6587\u672c\u9009\u62e9<\/strong><br \/> <a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/017f694a37eff23e5f1bf4738ffe89c4.png\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/017f694a37eff23e5f1bf4738ffe89c4.png\" width=\"700\" height=\"260\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u5c31\u50cf\u5927\u591a\u6570\u539f\u751fiOS\u5e94\u7528\u7a0b\u5e8f\u4e0d\u5141\u8bb8\u6587\u672c\u9009\u62e9\u4e00\u6837\uff0c\u60a8\u53ef\u4ee5\u5728 PWA \u4e2d\u7981\u7528\u6b64\u529f\u80fd\u3002\u4e3a\u6b64\uff0c\u8bf7\u5c06<code>-webkit-user-selectCSS<\/code>\u5c5e\u6027\u8bbe\u7f6e<code>none<\/code>\u4e3a\u60a8\u4e0d\u60f3\u9009\u62e9\u7684\u5143\u7d20\u3002\u8981\u5b8c\u5168\u5173\u95ed\u6587\u672c\u9009\u62e9\uff0c\u8bf7\u5c06\u8be5\u5c5e\u6027\u5206\u914d\u7ed9\u60a8\u7684body\u5143\u7d20\u3002<\/p>\n<pre>  body {     -webkit-user-select: none;  }  <\/pre>\n<p><strong>6.2 \u7981\u7528\u9ad8\u4eae<\/strong><br \/> <a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/c326ad2db0f3a1f9f9eb2c4f8964e1f0.png\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/c326ad2db0f3a1f9f9eb2c4f8964e1f0.png\" width=\"1125\" height=\"416\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u5728iOS\u7f51\u7edc\u6d4f\u89c8\u5668\u4e2d\u70b9\u51fb\u94fe\u63a5\u65f6\uff0c\u5143\u7d20\u5468\u56f4\u4f1a\u51fa\u73b0\u4e00\u4e2a\u7070\u8272\u6846\u3002\u867d\u7136\u6ca1\u6709\u7b80\u5355\u7684\u65b9\u6cd5\u53ef\u4ee5\u7981\u7528\u6b64\u6548\u679c\uff0c\u4f46\u60a8\u53ef\u4ee5\u5c06\u7a81\u51fa\u663e\u793a\u989c\u8272\u66f4\u6539\u4e3a\u900f\u660e\uff0c\u4ece\u800c\u6709\u6548\u5730\u4f7f\u5176\u6d88\u5931\u3002\u8981\u4e3a\u60a8\u7684PWA\u6267\u884c\u6b64\u64cd\u4f5c\uff0c\u8bf7\u5c06<code>-webkit-tap-highlight-color<\/code>\u5c5e\u6027\u8bbe\u7f6e<code>transparent<\/code>\u4e3a\u6240\u9700\u5143\u7d20\uff08\u6216\u5c06\u5176\u5206\u914d\u7ed9body\u5143\u7d20\u4ee5\u7981\u7528\u6240\u6709\u5143\u7d20\u7684\u94fe\u63a5\u7a81\u51fa\u663e\u793a\u3002\uff09<\/p>\n<pre>  body {     -webkit-tap-highlight-color: transparent;  }  <\/pre>\n<p><strong>6.3 \u7981\u7528\u6807\u6ce8<\/strong><br \/> <a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/0356806edef16f04ed77113ac519b34d.png\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/0356806edef16f04ed77113ac519b34d.png\" width=\"700\" height=\"778\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u5982\u679c\u60a8\u5728iOS\u6d4f\u89c8\u5668\u4e2d\u70b9\u51fb\u5e76\u6309\u4f4f\u67d0\u4e2a\u5143\u7d20\uff0c\u5b83\u5c06\u6253\u5f00\u4e00\u4e2a\u6807\u6ce8\u83dc\u5355\uff08\u5982\u4e0a\u6240\u793a\uff09\u3002\u8981\u5728iOS\u4e0a\u7981\u7528\u6b64\u6548\u679c\uff0c\u8bf7\u5c06\u6240\u9700\u5143\u7d20\u7684<code>-webkit-touch-callout<\/code>\u5c5e\u6027\u8bbe\u7f6e<code>none<\/code>\u4e3a \u3002\u540c\u6837\uff0c\u8981\u7981\u7528\u6240\u6709\u5143\u7d20\u7684\u6548\u679c\uff0c\u8bf7\u5c06\u5c5e\u6027\u5206\u914d\u7ed9\u60a8\u7684body\u5143\u7d20\u3002<\/p>\n<pre>  body {     -webkit-touch-callout: none;  }  <\/pre>\n<h2>7.\u542f\u7528\u70b9\u51fb\u6548\u679c<\/h2>\n<p><a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/bf4287c1ly1gtkca2enapg20v90nddu8.gif\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/bf4287c1ly1gtkca2enapg20v90nddu8.gif\" width=\"1125\" height=\"841\" alt=\"\u4e3aiOS\u8bbe\u8ba1\u7c7b\u4f3c\u539f\u751f\u7684Progressive Web Apps\u5e94\u7528\u7a0b\u5e8f\" \/><\/a><br \/> \u60a8\u53ef\u4ee5\u6dfb\u52a0\u81ea\u5df1\u7684\u70b9\u51fb\u6548\u679c\uff0c\u800c\u4e0d\u662f\u5728\u70b9\u51fb\u94fe\u63a5\u65f6\u4f7f\u7528\u9ed8\u8ba4\u7684\u7070\u8272\u7a81\u51fa\u663e\u793a\u3002\u901a\u8fc7<code>ontouchstart<\/code>\u5728\u4ee3\u7801\u7684body\u6807\u7b7e\u4e2d\u5305\u542b\u8be5\u5c5e\u6027\u5e76\u4fdd\u6301\u5176\u503c\u4e3a\u7a7a\uff0c\u94fe\u63a5\u548c\u5176\u4ed6\u5143\u7d20\u5c06\u5728\u70b9\u51fb\u65f6\u663e\u793a\u5b83\u4eec\u7684:hover\u548c:active\u6548\u679c\u3002\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5e76\u5c1d\u8bd5\u4e0d\u540c\u7684:hover\u548c:active\u6837\u5f0f\u4ee5\u627e\u5230\u6700\u9002\u5408\u60a8\u7684PWA\u7684\u6548\u679c\u3002<\/p>\n<pre>  &lt;html&gt;     &lt;head&gt;        ...     &lt;\/head&gt;     &lt;body ontouchstart=\u201d\u201d&gt;        ...     &lt;\/body&gt;  &lt;\/html&gt;  <\/pre>\n<p>Appscope\u662fProgressive Web Apps\u7684\u9886\u5148\u76ee\u5f55\uff0c\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u4e0e\u6240\u6709\u8bbe\u5907\u517c\u5bb9\u7684\u57fa\u4e8eWeb\u7684\u6700\u4f73\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Progressive Web APP\u5e94\u7528\u7a0b\u5e8f(PWA)\u7684\u4e3b\u8981\u7279\u5f81\u4e4b\u4e00\u662f\u5e94\u7528\u7a0b\u5e8f\u76f8\u4f3c\u6027\u3002\u5c3d\u7ba1\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u5728\u6280\u672f\u4e0a\u662f\u5728Web\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\u7684\uff0c\u4f46\u60a8\u5e94\u8be5\u52aa\u529b\u4f7f\u5176\u770b\u8d77\u6765\u548c\u611f\u89c9\u4e0a\u4e0e\u672c\u673a\u5e94\u7528\u7a0b\u5e8f\u4e00\u6837\u597d\u3002\u8fd9\u5305\u62ec\u4f7f\u5176\u53ef\u5b89\u88c5\u5728\u4e3b\u5c4f\u5e55\u4e0a\u3001\u6dfb\u52a0\u81ea\u5b9a\u4e49\u56fe\u6807\u3001\u7981\u7528\u5730\u5740\u680f\u7b49\u3002\u4e0eAndroid\u4e0d\u540c\uff0cWeb App Manifest\u4f1a\u81ea\u52a8\u4e3a\u5176\u751f\u6210\u8bb8\u591a\u7c7b\u4f3c\u672c\u673a\u7684\u529f\u80fd\uff0c\u800ciOS\u9700\u8981\u4e00\u4e9b\u989d\u5916\u7684HTML\u548cCSS\u6280\u5de7\u3002\u8fd9\u91cc\u6709\u4e03\u4e2a\u5173\u4e8e\u5982\u4f55\u8ba9\u4f60\u7684PWA\u5728iOS\u4e0a\u66f4\u50cf\u539f\u751f\u7684\u5efa\u8bae\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-101358","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/101358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/comments?post=101358"}],"version-history":[{"count":0,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/101358\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/media?parent=101358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/categories?post=101358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/tags?post=101358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}