开发者

Why does style does not change even when I change site.css?

I tried to start my first ASP.NET MVC program and wanted to modify some parts of the project.

When I tried to change the background color of the page body, I went to the Site.css file and changed the colo开发者_运维技巧r to #ffffff. When I rebuilt the program the color remained the same, and I found out the only way to change it is to delete it and load it back to the project.

It seems to me as if I'm missing something very basic, could you help me with that?


Some browsers cache your CSS aggressively; you may want to perform a force refresh each time you make a change to your external stylesheet (Ctrl+F5 or Ctrl+Shift+R).

I had this happen to me with my ASP.NET WebForms project the other day. As implied in the comments, IE is a well-known culprit of this kind of thing.


I think it's cached by your browser. In our projects we do embed our css/js in the assembly after development to avoid such problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜