Asp.net mvc 4 MVC4中的引导和字体设计

Asp.net mvc 4 MVC4中的引导和字体设计,asp.net-mvc-4,twitter-bootstrap,font-awesome,Asp.net Mvc 4,Twitter Bootstrap,Font Awesome,我正在使用MVC4,并通过nuget添加了引导和字体 我可以通过下面的BootstrapBundleConfig.cs(由nuget软件包添加)了解Bootstrap是如何捆绑的: 我有以下问题: 对于font awesome,我没有看到与上面类似的用于注册所需css文件的捆绑代码,是否有,或者我只是链接到内容目录中的样式表-正确的方法是什么 对于bootstrap,如果我不想要一个响应性布局,我是否可以从Include(“~/Content/bootstrap.css”、“~/Content/

我正在使用MVC4,并通过nuget添加了引导和字体

我可以通过下面的
BootstrapBundleConfig.cs
(由nuget软件包添加)了解Bootstrap是如何捆绑的:

我有以下问题:

  • 对于font awesome,我没有看到与上面类似的用于注册所需css文件的捆绑代码,是否有,或者我只是链接到内容目录中的样式表
    -正确的方法是什么
  • 对于bootstrap,如果我不想要一个响应性布局,我是否可以从
    Include(“~/Content/bootstrap.css”、“~/Content/bootstrap responsive.css”)
    中注释掉bootstrap-responsive.css

  • 您可以在网站上阅读更多关于捆绑如何工作的信息

    看起来引导nuget包已经为您制作了一些包。您可以修改它,将Font Awesome包含在现有捆绑包中,或者将其作为自己的捆绑包

    e、 g

    然后,您需要确保您的
    \u layout.cshtml
    呈现这些捆绑包(引导nuget可能没有为您这样做)

    e、 g

    如果不想在包中包含~/Content/bootstrap-responsive.css,只需从
    include
    方法中删除此字符串即可

    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"));
    }
    
    public static void RegisterBundles()
    {
        BundleTable.Bundles
            .Add(new ScriptBundle("~/bundles/bootstrap")
            .Include("~/Scripts/bootstrap*"));
    
        // Either add it to the  existing bundle
        BundleTable.Bundles
            .Add(new StyleBundle("~/Content/bootstrap")
            .Include("~/Content/bootstrap.css", 
                    "~/Content/bootstrap-responsive.css",
                    "~/Content/font-awesome.css"));
    
        // Or make it it's own bundle
        BundleTable.Bundles
            .Add(new StyleBundle("~/Content/font-awesome")
            .Include("~/Content/font-awesome.css"));
    
    }
    
    @Styles.Render("~/Content/bootstrap")
    
    // Or, if you made it it's own bundle
    @Styles.Render("~/Content/font-awesome")