【问题标题】:Bootstrap columns plus or minus gutterwidth引导列加或减装订线宽度
【发布时间】:2012-10-06 23:52:06
【问题描述】:

我使用带有 lesscss 的 Twitter Bootstrap。我喜欢网格系统,但我如何定义一个类来从.spanX 类(如.span3.span11)中添加或减去gutterwidth? 像这样的:

.addgutter {
    width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + @gridGutterWidth; 
}
.subtractgutter{
    width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) - @gridGutterWidth; 
}

但这是整个站点宽度加上/减去排水沟宽度。我需要它以便自动设置列宽加或减装订线宽度。 其实我对less不是很熟悉,我用了不到三个月。

最好的问候

【问题讨论】:

    标签: css twitter-bootstrap grid


    【解决方案1】:

    您可以通过下面给出的链接根据您的要求自定义 Twitter Bootstrap 的 CSS。我希望这会有所帮助。

    http://twitter.github.com/bootstrap/customize.html

    【讨论】:

    • 嗨,对不起,这没有帮助,因为我的问题不是我不知道如何更改网格。我需要对 Bootstrap 中不存在的网格进行新操作。而且我不知道哪个变量是对应使用的跨度类中实际使用的列数。
    猜你喜欢
    • 2014-01-20
    • 2014-02-15
    • 2017-02-25
    • 2013-01-27
    • 2015-06-11
    • 2023-03-03
    • 1970-01-01
    • 2014-02-22
    • 2015-09-04
    相关资源
    最近更新 更多