0
我創建了一個MVC 4應用程序(Internet模板)。它創建的身體寬1903px,高300px。在下面的圖片中,你可以看到它是如何渲染的。我沒有看到寬度被指定的地方,我很好奇它爲什麼決定創建寬度爲1903px(高度爲300px)。MVC 4 - 爲什麼我的身體設置爲1903px x 300px?
如果有幫助,主要頁面的HTML如下所示:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - The Exchange Site</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<header>
<div class="content-wrapper">
<div class="float-left">
<img src="~/Images/CompanyLogo.png">
</div>
<div class="float-right">
<section id="login">
@Html.Partial("_LoginPartial")
</section>
<nav>
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</nav>
</div>
</div>
</header>
<div id="body">
<section class="content-wrapper main-content clear-fix">
@RenderBody()
</section>
</div>
<footer>
<div class="content-wrapper">
<div class="float-left">
<p>© @DateTime.Now.Year - Siesta Key Software, LLC</p>
</div>
</div>
</footer>
@Scripts.Render("~/bundles/ExchangeSite")
@RenderSection("scripts", required: false)
</body>
</html>
_「它創建的身體寬1903px,高300px」_--你在哪裏看到這個?當沒有'@ Styles.Render(「〜/ Content/css」)'和'@ Scripts.Render(「〜/ bundles/modernizr」)''渲染時,你有同樣的問題嗎? – CodeCaster 2013-06-17 13:34:25