开发者

HTML PNG as ICO without conversion

I want to use a png as an ico in html, how could I go by doing this? I can you can use a png by some code such as:

<link rel="ico" type="png/ico" href="link"/>

What is the correct way to use a png as an iso with out converting it to an开发者_StackOverflow中文版 actual ico?


You can't use a PNG as an ICO. They are different file formats.

You can specify that the Favicon is a PNG image, and the syntax is exactly the same as for any other Favicon except that the type is the PNG type.

<link rel="icon" 
      type="image/png" 
      href="http://example.com/myicon.png">

Since a PNG isn't an ICO, the browser needs to support PNG images as Favicons for this to work.


Icons are just Bitmaps... You could just use one of these converters. Check out this question:

How to convert .ICO to .PNG?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜