Twitter bootstrap twitter引导程序mixin的使用

Twitter bootstrap twitter引导程序mixin的使用,twitter-bootstrap,sass,Twitter Bootstrap,Sass,我会在Twitter引导SASS的混合中使用offset变量,但它似乎不起作用 #headSearch{ @include makeColumn(6,2); } 相应地,TBS sass代码库: @mixin makeColumn($columns: 1, $offset: 0) { float: left; margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($grid

我会在Twitter引导SASS的混合中使用offset变量,但它似乎不起作用

#headSearch{
 @include makeColumn(6,2);

}
相应地,TBS sass代码库:

@mixin makeColumn($columns: 1, $offset: 0) {
  float: left;
  margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
  width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
}
谢谢

编辑:

我知道我不需要clearfix mixin alreadey包含到makeRow mixin中,我猜。 在我看来,这个想法是将列放入一个容器中的一行中,每一行自己堆叠(移动设备上的idem)。 实际上我不知道是否需要使用流体行来响应设计,或者固定布局是不考虑的。 那么,我的逻辑是好的吗


谢谢

欢迎来到SO@webmaster。你能详细解释一下你的问题吗?它似乎不起作用,它不是一个关于它发生在你身上的事情的正确解释。您是否将
头搜索
放在
内?你能给我们提供你的HTML布局吗?我想把第二个块放在右边,用偏移选项`重新启动服务器后,它似乎工作正常。但我的布局不适合屏幕大小。我是否使用rowFluid代替row?
@包括makeRowFluid不起作用…但流畅的方式是好的。请看我的答案:。该行为是使用该mixin的预期行为。
<div id="main">



 <!-- ______________________ CONTENT TOP REGION _______________________ -->
          <?php if (!empty($page['content_top'])): ?>
 <div class="rowZone">
 <section id="content-top"> <?php print render($page['content_top']); ?> </section><!-- /#content-top -->
          </div><!-- /rowZone -->
              <?php endif; ?>


   <!-- ______________________ ZONE DIAPO PANORAMIQUE _______________________ -->
               <?php if (!empty($page['DiapoHP'])): ?>
   <div class="rowZone">
       <section id="HPDiapo"><?php print render($page['DiapoHP']); ?></section>
       </div><!-- /rowZone -->
   <?php endif; ?>

<!-- ______________________ HOMEPAGE BAS _______________________ -->
<div class="rowZone">
<!-- ______________________ PARTIE BAS GAUCHE _______________________ -->

    <?php if (!empty($page['HPBasGauche'])): ?>

<section id="BasGaucheHP"> 
        <?php print render($page['HPBasGauche']); ?></section>

<?php endif; ?>

<!-- ______________________ PARTIE BAS DROITE _______________________ -->
    <?php if (!empty($page['HPBasDroit'])): ?>

<section id="BasDroitHP">
        <?php print render($page['HPBasDroit']); ?>
    </section><!-- /BasDroitHP --> 

<?php endif; ?>
    </div><!-- /rowZone -->
 </div> <!-- /mainPage -->
@import "../bootstrap/lib/bootstrap.scss";
@import "../bootstrap/lib/responsive.scss";
#main{
  @include clearfix;
}
.rowZone{
  @extend .row-fluid; }
#HPDiapo{
  @include makeColumn(12);
  @include clearfix;
  padding:10px 0 0;
}
#content-top{
    @include makeColumn(12);
    @include clearfix;
   }
#BasGaucheHP{
      @include makeColumn(6);
      @include clearfix;
}
#BasDroitHP{
 @include makeColumn(6);
}