如何应用bootstrap主题 [英] How to apply bootstrap theme

查看:114
本文介绍了如何应用bootstrap主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发vs 2012和mvc 4,只是一个小项目,我需要应用主题( http://all-free-download.com/free-website-templates/download/magic_city_template_2087.html [ ^ ])并删除默认值,任何人都可以帮我怎么做?



我尝试了什么:



i完成了所有复制工作,但面临捆绑问题.config和_layout.cshtml



i需要关于bundle.config和_layout.cshtml的帮助,

I am working on vs 2012 and mvc 4 ,just small project , i need to apply theme( http://all-free-download.com/free-website-templates/download/magic_city_template_2087.html[^] )and remove default one ,can any one help me how to do this ??

What I have tried:

i have done all copying stuff ,but facing problem in bundle.config and _layout.cshtml

i want help regarding bundle.config and _layout.cshtml ,

推荐答案

应用Bootstrap主题的步骤,



步骤1:复制应用程序内的所有Css和Java脚本。



步骤2:然后在bundle.con中添加相关的css文件和java脚本文件如下面的代码。



脚本:
Steps to Apply a Bootstrap theme,

Step 1 : Copy all the Css and Java scripts inside the application.

Step 2 : Then add the related css files and java script files in the bundle.config like the below code.

Scripts:
//--------------      jQgrid     ----------------
       bundles.Add(new ScriptBundle("~/bundles/jqgrid").Include(
                             "~/Scripts/free-jqGrid/i18n/grid.locale-en.js",
                             "~/Scripts/free-jqGrid/jquery.jqgrid.min.js"));



CSS:


CSS :

//--------------   Magic  Bootstrap     ----------------

bundles.Add(new StyleBundle("~/Content/magictheme").Include(
    "~/Content/bootstrap-dialog.css",
    "~/Content/assets/plugins/bootstrap/css/bootstrap.min.css"));





步骤2:添加layout.cshtml添加这些包名称:

CSS:



Step 2 : Add a layout.cshtml add these bundle names :
CSS :

<!-- standard jqGrid CSS -->
   @Styles.Render("~/Content/magictheme")





脚本:



Scripts :

@Scripts.Render("~/bundles/jqgrid")





第2步:请清除浏览器历史记录然后再试一次。这些是在ASP.NET MVC应用程序中进行捆绑的步骤。





如果要添加错误的css文件路径或者java脚本文件,您将在Bundle.config中收到错误。只需检查bundle.config中指定的所有路径是否正确。



如果您有任何问题,请告诉我。



Step 2 : Please clear the browser history and then try again. These are the steps for bundling in ASP.NET MVC application.


If you are adding a wrong path of either css file or a java script file , you will be getting errors in the Bundle.config. Just check if all the paths specified in the bundle.config are correct.

Please let me know if you have any issues.


这篇关于如何应用bootstrap主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆