【发布时间】:2013-06-25 10:45:14
【问题描述】:
我正在使用 MVC4,并通过 nuget 添加了 Bootstrap 和 Font Awesome。
我可以看到 Bootstrap 是如何通过下面的BootstrapBundleConfig.cs(由 nuget 包添加的)捆绑的:
public static void RegisterBundles()
{
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*"));
BundleTable.Bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css"));
}
我有以下问题:
- 对于 font-awesome,我没有看到与上面类似的用于注册所需 css 文件的捆绑代码,是否有,或者我只是链接到内容目录中的样式表
<link href="~/Content/font-awesome.min.css" rel="stylesheet" />- 什么是正确的方式? - 对于引导程序,如果我不想要响应式布局,我是否只需将
Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css"))中的 bootstrap-responsive.css 注释掉?
【问题讨论】:
标签: asp.net-mvc-4 twitter-bootstrap font-awesome