如何在 Laravel 中从 Bootstrap 4 降级到 3



我在谷歌上搜索过,但找不到任何有用的链接。 我正在将AdminLTE与laravel 5.6集成,AdminLTE需要bootstrape 3,laravel有4。 所以,我想从 4 降级到 Bootstrape 3。

如果有人只需要这个。

以下是步骤:

1. Npm install bootstrap@3.3.7
2. Change the bootstrap entry from package.json and replace it with "bootstrap": "3.3.7"
3. in resources/assets/sass/app.scss,
a. comment out the import of variables 
OR change height base to 14 px instead of 0.9 rem in _variable.scss. 
b. change the path of bootstrap to 
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
4. in resources/assets/js/bootstrap.js, 
look for require('bootsrap-sass'); and change it to require('bootstrap');

希望这有帮助!

最新更新