in English

Safisha

Futa kwa haraka na kwa urahisi maudhui yaliyoelea ndani ya kontena kwa kuongeza matumizi ya kurekebisha.

Safisha kwa urahisi floats kwa kuongeza .clearfix kipengele cha mzazi . Inaweza pia kutumika kama mchanganyiko.

<div class="clearfix">...</div>
// Mixin itself
@mixin clearfix() {
  &::after {
    display: block;
    content: "";
    clear: both;
  }
}

// Usage as a mixin
.element {
  @include clearfix;
}

Mfano ufuatao unaonyesha jinsi clearfix inaweza kutumika. Bila kuweka wazi div ya kufunika haingezunguka vifungo ambavyo vinaweza kusababisha mpangilio uliovunjika.

<div class="bg-info clearfix">
  <button type="button" class="btn btn-secondary float-left">Example Button floated left</button>
  <button type="button" class="btn btn-secondary float-right">Example Button floated right</button>
</div>