1. 将图标文件命名为favico.ico(有在线生成工具,不能只改后缀名),上传到网站根目录。
2. 在网站首页的源文件<head></head>之间插入下面的斜体部分代码<head>……<link rel="shortcut icon" href="favicon.ico"></head>
3.动态ico图标的实现方法,先把做好的gif动态图标命名为favico.gif <head></head>之间加上: <link rel="icon" href="favicon.gif" type="image/gif" >
这个不是H5特有的情况,只是设计师习惯性用法,用i表示ico图标,便于他人理解。例子:
<ul><li><i class="ico1"></i>首页</li><li><i class="ico2"></i>关于我们</li></ul><style>
.ico1,.ico2{background:url(test.png) center left no-repeat width:15px height:15px}
</style>