Switching between Twitter Bootstrap Themes?

后端 未结 4 1048
不思量自难忘°
不思量自难忘° 2021-02-11 03:51

I\'m working on a project for a client built on Twitter Bootstrap. He wants to have different colour schemes that the user can select from. For example have a Red Colour Scheme

4条回答
  •  旧巷少年郎
    2021-02-11 04:26

    I tested this on IE11, Chrome, Firefox and it works:

    1.

    
    

    2.

    Cerulean
    
    1. Code:

      function changeCurrentTheme(theNewThemeName) {
        $("#theBoostrapTheme").attr("href", "Content/bootstrap-theme.min" + theNewThemeName + ".css");
        }
      

    In this case the theme files other than the original were named like this: bootstrap-theme.min_ …. .css. For example: bootstrap-theme.min_Cerulean.css

提交回复
热议问题