[英]while accessing a view through controller CSS is not working
我正在asp.net mvc应用程序上工作index.cshtml是我运行应用程序时的默认页面,该启动页面在应用CSS的情况下运行,但是当我从控制器“ / home / index”访问此页面时,css无法正常工作原因 ?
Try to use '/' as prefix in the css path. 尝试在CSS路径中使用“ /”作为前缀。 it consider from the root.
它从根本上考虑。
<link rel="stylesheet" href="/css/style.css" type="text/css" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.