我无法从 site.css 文件访问 css 类。但是如果我在我的个人视图(.cshtml)文件中编写这些类,那么我可以访问它们。请建议代码详细信息如下:#mask { position:absolute; }
/* You can customize to your needs */
.Add-popup
{
background: white;
}
img.btn_close
{
float: right;
}
'
i have above classes in CSS file
1) this is my _layout.cshtml
'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css"/>
</head>
</html>
'
2) this is my view
'
@{
ViewBag.Title = "View";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@if (false)
{
<script src="../../Scripts/jquery-1.7.1-vsdoc.js" type="text/javascript"></script>
<link type="text/css" href="../../Content/Site.css" rel="stylesheet" />
<script src="...../ui/jquery.ui.mouse.js"></script>
<script src="...../ui/jquery.ui.draggable.js"></script>
}
@if (User.IsInRole("Owner"))
{
<div id="box" class="Add-popup"> <a href="#" class="close"><img src="../../Content/images/close_button.png" class="btn_close" title="Close Window" alt="Close" /></a>
</div>
}
'
still i am not able to access those classess from CSS file.
please reply if anybody has solution?