你需要 Bootstrap 的每个部分吗?因为有很多臃肿的代码。
尝试禁用主引导文件中的某些部分:
您需要 JavaScript 部分的所有 CSS 吗?
你需要“代码”和“表格”吗?
在“响应式实用程序”中,如果您不需要它,您可以注释掉很多。
让我向您展示我的设置,它在 SASS 中,但原理保持不变:
// Compass utilities
@import "compass";
// Core variables and mixins
@import "includes/variables";
@import "includes/mixins";
// Reset
@import "includes/normalize";
@import "bootstrap/print";
// Core CSS
@import "includes/scaffolding";
@import "includes/type";
//@import "bootstrap/code";
@import "includes/grid";
//@import "bootstrap/tables";
@import "includes/forms";
@import "includes/buttons";
// Components: common
@import "includes/component-animations";
@import "bootstrap/glyphicons";
//@import "includes/dropdowns";
@import "includes/button-groups";
//@import "bootstrap/input-groups";
//@import "bootstrap/navs";
//@import "includes/navbar";
//@import "bootstrap/breadcrumbs";
//@import "bootstrap/pagination";
//@import "bootstrap/pager";
//@import "bootstrap/labels";
//@import "bootstrap/badges";
//@import "bootstrap/jumbotron";
//@import "bootstrap/thumbnails";
//@import "bootstrap/progress-bars";
//@import "bootstrap/media";
//@import "bootstrap/list-group";
//@import "bootstrap/panels";
//@import "bootstrap/wells";
@import "includes/close";
// Components w/ javascript
@import "includes/alerts";
@import "bootstrap/modals";
//@import "bootstrap/tooltip";
@import "includes/popovers";
//@import "includes/carousel";
// Utility classes
@import "bootstrap/utilities"; // Has to be last to override when necessary
@import "bootstrap/responsive-utilities";
//custom styling
@import "includes/customstyles";