問題描述
我正在使用以下代碼來獲取移動設備的觸摸圖標 - 它基于 html5boilerplate/mobile 示例:
I'm using the following code to get touch icons for mobile devices - it's based on the html5boilerplate/mobile example:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<!-- For iPhone 4 with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/touch/h/apple-touch-icon.png">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="/img/touch/l/apple-touch-icon.png">
<!-- For nokia devices: -->
<link rel="shortcut icon" href="/img/touch/apple-touch-icon.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
但由于某種原因,iPhone 仍然給我的主屏幕圖標帶來問題.我得到的只是那個煩人的屏幕截圖圖標.
But for some reason, the iPhone is still giving me problems for the home screen icon. All I get is that annoying screenshot icon.
我在這里包含了其他元標記,以防它們闡明為什么它不起作用.我試過重新排序標簽.
I've included the other meta tags here in case they shed some light on why it isn't working. I've tried reordering the tags.
誰能想到任何可能阻止圖標被使用的事情?
Can anyone think of anything that might stop the icons being used?
我使用 html5boilerplate/mobile 作為測試用例 - 我能夠瀏覽到他們的網站并將圖標添加到我的 iPhone (4S iOS5) 的主屏幕上.我嘗試將他們的代碼、文件夾結構和圖標復制到我自己的站點中,但這沒有用.
I've used html5boilerplate/mobile as a test case - I'm able to browse to their site and add the icon to the home screen on my iPhone (4S iOS5). I've tried copying their code, folder structure, and icons into my own site, but this didn't work.
有什么想法嗎?
推薦答案
我把相同的頁面和圖標放在另外兩個網站上,效果很好,所以我想可能是因為我原來在做的兩個測試服務器受密碼保護 - 雖然顯然我輸入了瀏覽頁面的憑據,所以不完全確定為什么會出現問題.然而,結果似乎表明情況確實如此.
I put the same page and icon on two other sites and it worked perfectly, so I think maybe it might be because the original two test servers I was working on were password protected - although obviously I'd entered the credentials to browse the page, so not entirely sure why that would be a problem. However, the results appear to suggest this was the case.
這篇關于Apple 觸摸圖標未顯示在主屏幕上的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!