1

我真的很抱歉问这个问题。这是我试图解决一个问题的几个小时。我是 ASP.NET MVC 的新手。我有一个 css 文件,我在其中引用了两个图像。这是代码:

.white
{
    background-image: url("images/site/glyphicons-halflings-white.png");
}
.normal
{
    background-image: url("images/site/glyphicons-halflings.png");
}

我还将这些图像添加到Content\images\site文件夹中。但它不加载图像并且 css 不起作用。我可以在 firebug 中看到这些错误消息:

NetworkError: 404 Not Found -http://localhost:38544/Content/images/site/glyphicons-halflings.png"

网络错误:404 未找到 -http://localhost:38544/Content/images/site/glyphicons-halflings-white.png"

提前感谢任何帮助。

4

1 回答 1

4

404 错误非常强烈地表明您在 CSS 中拼错了图像文件名或忘记实际复制指定文件夹中的图像。

于 2012-12-29T17:01:55.200 回答