浏览器标签显式网页logo

对于不同的浏览器,方法是有差别的:

1.对于IE或TT浏览器,把需要显示的16x16像素的ICO图标命名为favicon.ico放置在网站指定目录下(目录自定,如img);

2.这大概是所有浏览器通用的在标签页加入指定图标的方法:

  favicon.ico图标放到网站根目录下,在网页的<head></head>中加入

  <link rel="shortcut icon" href="img/[目录]favicon.ico" type="image/x-icon" /> 

3.对于火狐浏览器:图标格式没有IE那么严格,GIF和PNG格式的图标也可以显示,图标名称也可以不是favcion;

4.把图标放在指定目录后,在<head></head>中加入

  <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
  <link rel="icon" href="img/gif_favicon.gif" type="image/gif" >

  <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
  <link rel="icon" href="img/png_favicon.png" type=" image/png" >

原文地址:https://www.cnblogs.com/siliconvalley/p/3098800.html