【发布时间】:2018-06-29 08:45:44
【问题描述】:
我有一个全新的 ASP.Net MVC5 应用程序。我想将默认主题更改为Minty 主题,即Bootstrap Version 4。但是,按照以下步骤操作后,主题变得混乱,无法正确显示导航栏等组件。 谁能指导我如何安装来自Bootswatch 的最新主题。
因为它是一个全新的 ASP.Net MVC 应用程序。我做了以下事情:
- 已安装 引导程序:
Install-Package bootstrap - Version 4.0.0 - 已安装 jQuery:
Install-Package jQuery -Version 3.2.1 - 已安装 Popper.js:
Install-Package popper.js -Version 1.12.9
以上安装后。我做了以下步骤来尝试更改默认主题:
- 选择Minty主题并下载并复制
bootstrap.css样式 - 调用文件
minty.bootstrap.css - 将
minty.bootstrap.css添加到Content文件夹 - 更新了捆绑包以定位文件夹 App_Start -> BundleConfig.cs 中的新 Minty 主题
BundleConfig.cs 文件:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/minty.bootstrap.css",
"~/Content/site.css"));
_Layout.cshtml 文件:
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
然后构建项目检查更改,但导航栏与预期不符:
谢谢
【问题讨论】:
标签: jquery css asp.net twitter-bootstrap