ASP MVC进口CSS [英] ASP MVC import CSS
本文介绍了ASP MVC进口CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我新的ASP.NET MVC和我想包括CSS文件到我的看法。
该视图是强类型,并具有列表脚手架模板,它与它本身链接到一个CSS文件和母版幻灯片工作正常,但母版页试图将视图链接到一个单独的css文件我当不能因为我不能包括标签。
任何人都知道我怎么能解决这个问题?
解决方案
<链接HREF =@ Url.Content(〜/内容/ YOURSTYLESHEET.css)相对= 样式类型=文/ CSS/>
I am new to ASP.NET MVC and I am trying to include a CSS file into my view.
The view is strongly typed and has a List Scaffold Template, it is linked to a master page which itself is linked to a css file and works fine for the master slide but when trying to link the view to a seperate css file I cant as I cannot include tags.
Anybody know how I can resolve this?
解决方案
<link href="@Url.Content("~/Content/YOURSTYLESHEET.css")" rel="stylesheet" type="text/css" />
这篇关于ASP MVC进口CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文