在bootstrap中,我们可以添加0-5的保证金,但我想使用bootstrap添加更多的保证金,我尝试了以下m-8,但它不起作用
发布于 2020-08-06 16:10:12
您可以将新的间隔符定义添加到$spacers变量,为此使用您自己的custom.scss,如下所示:
// 1. import bootstrap's variables to override them
@import "../node_modules/bootstrap/scss/variables";
// 2. your overrides
$spacers: (
0: 0,
1: ($spacer * .25),
2: ($spacer * .5),
3: $spacer,
4: ($spacer * 1.5),
5: ($spacer * 3),
6: ($spacer * 5)
)
// 3. bootstrap and its default variables
@import "../node_modules/bootstrap/scss/bootstrap";基本上,您可以在_variables.scss中找到任何与您相关的内容,您都可以覆盖它们。
有关更多详细信息,请参阅此答案:https://stackoverflow.com/a/46125059/3584353
关于在这里覆盖引导程序变量:https://getbootstrap.com/docs/4.0/getting-started/theming/
https://stackoverflow.com/questions/63271220
复制相似问题