【发布时间】:2015-03-09 11:45:06
【问题描述】:
我在我的小项目中添加了 jquery ui,但没有添加 css。
以下捆绑包用于 css:
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
在我的 _Layout.cshtml 中有以下内容:
@Styles.Render("~/Content/themes/base/css", "~/Content/css")
Global.asax.cs 已将 BundleConfig 设置为在 Application_Start() 上注册......
我清除了我的 Firefox 缓存,但我仍然只在我的页面上获得默认的 bootstrap.css 和 site.css。
有什么想法吗?我不知道这里还有什么要检查的,我有一些对话框正在玩用于杂乱无章的功能,但它们没有风格。
【问题讨论】:
-
尝试更改捆绑包的名称。
-
我之前尝试过,但无济于事。
-
请检查 css 文件是否在您的项目 (
"/Content/themes/base/") 提供的目录中,我知道您的"~/Content/css"包已加载?
标签: c# css jquery-ui asp.net-mvc-5