我下载了 jquery ui 主题的 redmond 主题。将 redmond 下的所有内容复制到\content\themes,将 jquery-ui-1.8.21.custom.min.js 复制到\scripts,将 jquery 更新为 jquery-1.7.2.js 并将以下内容添加到 _Layout.cshtml。 但是,用户界面似乎没有改变。
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/redmond/jquery-ui-1.8.21.custom.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-ui-1.8.21.custom.min.js")" type="text/javascript"></script>
<meta name="viewport" content="width=device-width" />
Here is the structure of the Content folder
Content
Themes
base
redmond
images
jquery-ui-1.8.21.custom.css
Site.css
Scripts
jquery-1.7.2.min.js
jquery-ui-1.8.21.custom.min.js
最佳答案
事实上,它正在发挥作用。我从包中的 index.html 复制了一些 ui 控件到我的网页。它工作正常。
关于JQUERY UI 主题 css 未应用于 ASP.NET MVC 4 Web 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11195127/