gpt4 book ai didi

css - 如何使用 Less 自定义 Bootstrap 中网格的偏移选项

转载 作者:行者123 更新时间:2023-12-02 09:43:14 24 4
gpt4 key购买 nike

我想减少 col-md-offset-1 的宽度bootstrap 分配 margin-left在某个地方。我希望通过使用 LESS 来完成此操作。

最佳答案

您实际上并不需要 Less,因为解决方案与纯 CSS 中的解决方案完全相同。只需重写相应的属性即可:

@media (min-width: 992px) {
.col-md-offset-1 {
margin-left: 42%; /* <- your value here */
}
}

在 Less 中,您可以修改 Bootstrap 生成所有此类 offset 类的方法(通过覆盖/级联 these mixin and variables ),但这对于您实际需要的微小更改来说是一种矫枉过正。

关于css - 如何使用 Less 自定义 Bootstrap 中网格的偏移选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30013818/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com