我只是将其添加到head
_Layout.cshtml中。
<head>
<link rel="shortcut icon" type="image/ico" href="~/Images/favicon.ico">
</head>`
该图标仅在主页上显示,原因是什么?
通常,将所有与网站图标相关的文件放在网站的根目录中是一个好习惯。某些浏览器将始终在根文件夹中检查favicon.ico。
<head>
<link rel="shortcut icon" type="image/ico" href="~/favicon.ico">
</head>
另外,看看这些帖子
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句