0
我真的很抱歉提出這個問題。幾個小時我試圖解決一個問題。我是ASP.NET MVC的新手。我有一個css文件,其中我指的是拖曳圖像。這裏是代碼:圖片無法加載在asp.net mvc 4
.white
{
background-image: url("images/site/glyphicons-halflings-white.png");
}
.normal
{
background-image: url("images/site/glyphicons-halflings.png");
}
我也將這些圖像添加到Content\images\site
文件夾。但它不加載圖像和CSS不起作用。我可以在螢火蟲中看到這些拖曳錯誤訊息:
NetworkError: 404 Not Found -http://localhost:38544/Content/images/site/glyphicons-halflings.png"
NetworkError: 404 Not Found -http://localhost:38544/Content/images/site/glyphicons-halflings-white.png"
任何幫助提前感謝。
您確定沒有拼寫錯誤的文件名嗎?你的代碼看起來很好。 –
這會讓我發瘋。我複製了文件名。 – Beginner
這是IISExpress(或卡西尼,如果這就是你正在使用)本地發生?或者當你在IIS上部署應用程序? –