Asp.net mvc 使用jumbotron时,RenderBody()与_Layout.cshtml重叠
我是ASP.Net新手,我尝试创建一个简单的登录页面。版面页面有一个jumbotron。但我的登录控件与jumbotron重叠 谢谢你的帮助 \u Layout.cshtml-文件Asp.net mvc 使用jumbotron时,RenderBody()与_Layout.cshtml重叠,asp.net-mvc,bootstrap-modal,render-html,Asp.net Mvc,Bootstrap Modal,Render Html,我是ASP.Net新手,我尝试创建一个简单的登录页面。版面页面有一个jumbotron。但我的登录控件与jumbotron重叠 谢谢你的帮助 \u Layout.cshtml-文件 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initia
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - Title</title>
<link href="~/Content/Site.css" rel="stylesheet" />
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/bootstrap.css" rel="stylesheet" />
<link href="~/css/Main.scss" rel="stylesheet" type="text/css"/>
<script src="~/Scripts/modernizr-2.6.2.js"></script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container-fluid">
<div class="jumbotron">
<h2>Welcome to Application</h2>
</div>
</div>
</div>
<div id ="main" class="col-lg-8">
@RenderBody()
</div>
</body>
</html>
@ViewBag.Title-Title
欢迎申请
@RenderBody()
Login.cshtml-登录视图
@{
Layout = "~/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Login";
}
@using (Html.BeginForm("Login", "Home", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
if (@ViewBag.LoginErrorMsg != null)
{
<div class="form-group has-error">
@ViewBag.LoginErrorMsg
</div>
}
<div class="container body-content">
<div class="container-fluid">
<div class="col-md-4"></div>
<div class="col-md-4">
<div class="form-group">
@Html.LabelFor(a => a.email, new { @class = "control-label" })
@Html.TextBoxFor(a => a.email, new { @class = "form-control" })
@Html.ValidationMessageFor(a => a.email)
</div>
<div class="form-group">
@Html.LabelFor(a => a.Password, new { @class = "control-label" })
@Html.TextBoxFor(a => a.Password, new { @class = "form-control" })
@Html.ValidationMessageFor(a => a.Password)
</div>
<button type="submit" class="btn btn-default">Login</button>
</div>
<div class="col-md-4"></div>
</div>
</div>
}
@{
Layout=“~/Views/Shared/_Layout.cshtml”;
ViewBag.Title=“登录”;
}
@使用(Html.BeginForm(“Login”、“Home”、FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
如果(@ViewBag.LoginErrorMsg!=null)
{
@ViewBag.loginerrormg
}
@LabelFor(a=>a.email,新的{@class=“control label”})
@TextBoxFor(a=>a.email,新的{@class=“form control”})
@Html.ValidationMessageFor(a=>a.email)
@LabelFor(a=>a.Password,新的{@class=“control label”})
@TextBoxFor(a=>a.Password,新的{@class=“form control”})
@Html.ValidationMessageFor(a=>a.Password)
登录
}
这是我得到的结果请阅读上的引导文档 需要车身衬垫 固定导航栏将覆盖其他导航栏 内容,除非您在页面顶部添加填充。试试你的 拥有自己的值或使用下面的代码片段。提示:默认情况下,导航栏为 50px高
body { padding-top: 70px; }
确保在核心引导CSS之后包含此内容
请阅读上的引导文档 需要车身衬垫 固定导航栏将覆盖其他导航栏 内容,除非您在页面顶部添加填充。试试你的 拥有自己的值或使用下面的代码片段。提示:默认情况下,导航栏为 50px高
body { padding-top: 70px; }
确保在核心引导CSS之后包含此内容
你可能需要玩弄css代码我猜你可能需要玩弄css代码我猜