我正在学习 JQuery 并试图让它与 ASP.NET MVC 4 一起工作。我似乎无法让它在移动浏览器中正确显示。主页按钮、列表视图、按钮……等等……为什么会这样显示?
我的主布局页面的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale = 1" />
<link href="@Url.Content("~/Content/jquery.mobile.theme-1.1.0.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.mobile-1.1.0.min.js")" type="text/javascript"></script>
@*<link rel="stylesheet" href="@Url.Content("~/Content/Site.Mobile.css")" />*@
</head>
<body>
<div data-role="page" data-theme="b">
<div data-role="header" data-theme="a">
<a href="@Url.Content("~")" data-icon="home" data-iconpos="notext">Home</a>
@Html.Label("Hello World")
<div data-role="navbar">
<ul>
<li><a href="#">Logo</a></li>
<li><a href="#">Apparel</a></li>
<li><a href="#">Design</a></li>
<li><a href="#">Art</a></li>
</ul>
</div>
</div>
<div data-role="content">
@*@RenderSection("featured", false)*@
@RenderBody()
</div>
<div data-role="footer">
<h1>Thank you</h1>
@Html.Partial("_ViewSwitcher")
</div>
</div>
</body>
</html>