我正在尝试使用StyleBundle将引导样式添加到现有项目中。同一捆绑包中的其他样式可以工作,但是引导程序样式不能。这是我的包:
bundles.Add(new StyleBundle("~/bundles/css").Include(
"~/Content/boostrap/boostrap.css",
"~/Content/boostrap/boostrap-responsive.css",
"~/Content/boostrap/boostrap-theme.css",
"~/Content/font-awesome.css",
"~/Content/Site.css"));
@Styles.Render("~/bundles/css")
@Scripts.Render("~/bundles/modernizr")在Google Chrome > F12 > Network > Stylesheets选项卡中,我看不到bootstrap样式,但我可以看到font-awesome.css和site.css样式。
但是,如果我将样式拖放到index.html页面标题中,就可以看到它们。
<link href="~/Content/bootstrap/bootstrap.css" rel="stylesheet" />
<link href="~/Content/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
<link href="~/Content/bootstrap/bootstrap-theme.css" rel="stylesheet" />我也没有在浏览器中看到任何错误。我在bootstrap中遗漏了什么特别的东西吗?
发布于 2013-12-09 02:40:13
您的代码声明:../boostrap/...您应该使用/bootstrap/。这是一个简单的打字错误。
https://stackoverflow.com/questions/19107645
复制相似问题