【问题标题】:Bootstrap, less - make a box where height = widthBootstrap, less - 制作一个高度 = 宽度的盒子
【发布时间】:2014-03-27 22:23:37
【问题描述】:

我正在尝试减少和引导混合。我需要的是一个有 4 列且高度相同的盒子。

.box-4x4 {
  .make-lg-column(4);
  height: ?
}

有什么方法可以用LESS来计算吗?

【问题讨论】:

    标签: css twitter-bootstrap less


    【解决方案1】:

    只需查看.make-lg-column mixin 的the definition 并将其应用于height,例如:

    .box-4x4 {
        @columns: 4;
        .make-lg-column(@columns);
        @media (min-width: @screen-lg-min) {
            height: percentage((@columns / @grid-columns));
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-24
      • 2019-01-15
      • 2013-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-16
      • 1970-01-01
      相关资源
      最近更新 更多