视图页面(非_layout)上的MVC CSS无法正常工作 [英] MVC CSS on view page (not _layout) not working
本文介绍了视图页面(非_layout)上的MVC CSS无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对MVC4 CSS有问题.我在另一个名为"registerUser.cshtml"的视图页面中包含一个名为registration.css的CSS文件.此页面就像mvc4剃须刀中的内容页面.但是问题是CSS无法正常工作.
I have a problem with MVC4 CSS. i m including a CSS file named registration.css in an another view page named "registerUser.cshtml". This page is like a content page in mvc4 razor. but problem is that CSS is not working.
我该如何解决.我还以
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/registration.css"));
但是它也不起作用.帮帮我.
But it is also not working. Help me.
推荐答案
使用
@Styles.Render("~/Content/css")
代替
@Styles.Render("~/Content/registration.css")
这篇关于视图页面(非_layout)上的MVC CSS无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文