图标不显示 [英] Favicon Not Showing

查看:176
本文介绍了图标不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的ASP.NET项目图标是没有显示出来。我放在〜/ MasterPages / MasterPage.master持有的图标一个母版。我的标记如下:

I have a favicon in my ASP.NET project that's not showing up. I have a masterpage located at ~/MasterPages/MasterPage.master that holds the favicon. My markup is as follows:

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

该图标位于项目的根。尺寸是16×16,它的32位深度。我已经清除浏览器的缓存,重启并没有什么工作。任何建议,我应该怎么办?

The favicon is located in the project root. The dimensions are 16x16 and it's 32-bit depth. I've cleared my browser's cache, rebooted and nothing is working. Any suggestions as to what I should do?

推荐答案

尝试放置一个并设置链接元素 RUNAT =服务器

Try placing a ~ and set the link elements to runat=server

<link runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
<link runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />

这也需要做的&LT;头方式&gt; 段的页面

这篇关于图标不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆