【问题标题】:add a favicon to a web page with html5使用 html5 将 favicon 添加到网页
【发布时间】:2021-12-10 22:51:50
【问题描述】:

当我想添加一个网站图标时,我会写这个标签::

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
但是当我打开网页时,我看不到图标。为什么?

【问题讨论】:

    标签: html add favicon


    【解决方案1】:

    试试这个

     <link href="path/favicon.png" rel="icon">
    

    【讨论】:

      【解决方案2】:

      您应该将图片重命名为Icon.png,并将代码更改为&lt;link rel="shortcut icon" type="image/png" href="Icon.png"&gt;,而不是将其命名为favicon.ico

      【讨论】:

        猜你喜欢
        • 2012-08-07
        • 2020-08-15
        • 1970-01-01
        • 1970-01-01
        • 2023-04-11
        • 2015-06-20
        • 1970-01-01
        • 2012-10-07
        • 2020-12-11
        相关资源
        最近更新 更多