Windows Phone 7 internet shortcut icon
When creating a shortcut to a website on Windows Phone 7, the icon it creates is a snapshot of the website instead of any sort of icon that I want it to display. For example, with iOS I can sepcify
<link rel="apple-touch-icon" href="Logo.ico" />
and it uses that icon for the home screen image.
I've tried
<link rel="shortcut icon" href="Logo.ico" />
which seems to work in IE but not IE mobile.
Has anyone successfully created a home screen icon for win开发者_JAVA百科dows phone 7 / IE7 mobile?
I assume you are referring to pinning a web page to the start screen.
This is by design. You cannot change it.
I think the intention is that you can see a better idea of where you will be taken to when tapping it. This is particularly true if you pins multiple pages from the same site (which would have the same icon otherwise).
If it was possible to set a custom icon, it would need to be 173x173 pixels which wouldn't be the same as any other platform. There would therefore be A LOT of sites/pages which didn't have this specified. If the fallback was to use the default favicon image this is typically only 16x16 (or 32x32) pixels and so would not look good on the 173x173 pixel tile.
All you need is a .css file, a 256x256 image.
.logo {
display:none;
}
@media screen and (max-width: 480px) {
.logo {
display:block;
text-align:center;
width:auto;
padding-top:32px !important;
padding-bottom:32px !important;
}
}
And right before the first html output make a div with logo class and your 256x256 image.
tested on Nokia Lumia 800
Even tough Matt Lacey is right, there is a way you can do this. It is not a very good way, but Google and others are using it.
Create a HTML-Page that has nothing on it except your tile-icon. This page redirects to your actual website. Now of course everyone has to pin the HTML-page to the start. You can tell your visitors to pin the HTML-page with a button or something similar.
OR
Create an overlay with JavaScript for your website for every windows phone user that wants to pin your website to the start (determined by a button "pin to start" on your website). More information on that one: http://www.russellbeattie.com/blog/creating-a-pinnable-windows-phone-7-tile-for-your-website-like-google
I'm also searching for a better way to create a tile for my blog in WP8 right now but apparently there is no straightfoward way.
精彩评论