MVC Site.css更改问题 [英] MVC Site.css change issues

查看:197
本文介绍了MVC Site.css更改问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很想在问题上有所帮助.我目前正在使用MVC 3设计一个网站.我的方法是使用Site.css文件进行通用设计,并使视图使用Site.css进行不同的视图.但是奇怪的是,我对Site.css文件所做的任何更改似乎都不会更改任何视图.

例如,我可以从Site.css文件中的绿色标题h1开始.我认为< h1>含量</h1>显示为绿色.但是,当我决定在Site.css文件中将其更改为其他颜色(白色)时,我视图中的所有h1标头都保持绿色而不是白色.对我来说,这似乎是我所做的任何更改均未正确应用,并且在调试时会显示最后成功的网站.我尝试重建并重新启动Visual Studio,但没有任何方法可以解决该问题. :(

有人知道我为什么遇到这个问题吗?任何帮助将不胜感激.

谢谢,
Nik

I would really like some help with an issue. I am currently designing a website using MVC 3. My approach is to use a Site.css file for the common design and have the views use the Site.css for the different views. Yet strangely, any changes that I make to the Site.css file do NOT seem to change any of the views.

For example, I may start with a green header h1 in my Site.css file. In my views, the <h1> content </h1> shows up just fine as green. Yet when I decide to change it to a different color (white) in the Site.css file, all of the h1 headers in my views remain green and not white. To me this seems like any changes I make aren''t applied properly and the last successful website is shown when debugging. I have tried rebuilding and restarting visual studio, and nothing fixes the problem. :(

Anyone have any clue why I am having this problem? Any help would be tremendously appreciated.

Thanks,
Nik

推荐答案

我会检查您正在修改的文件(site.css)是否已链接到_Layout.cshtml(或您使用的任何其他根模板)中)

i would check the file you are modifying (site.css) is infacted the file being linked into the _Layout.cshtml (or whatever other root template youre using)

"<link href="@Url.Content("~/Content/SiteTypoHere.css")" rel="stylesheet" type="text/css" />"



还将页面加载到FireFox中,使用firebug并选择标题,它将为您提供一个行号,以引用CSS代码和文件名(实际上是用于渲染
)

希望其中之一对您有所帮助.



also load the page in FireFox use firebug and select the heading it will give u a line number ref to the CSS code and filename it is ACTUALLY using to render


hope one of these helps you.


这篇关于MVC Site.css更改问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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