in English

Bobongisi ya polele

Noki mpe na pete kolongolaka makambo oyo ezali kopumbwapumbwa na kati ya eloko moko na kobakisa utilitaire ya clearfix.

Effacer floats facilement na kobakisa .clearfix na élément parent . Ekoki mpe kosalelama lokola mixin.

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

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

Ndakisa oyo elandi ezali kolakisa ndenge nini bakoki kosalela clearfix. Sans clearfix div ya enveloppe elingaki ko span te zinga zinga ya ba boutons oyo elingaki kosala que layout epanzana.

<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>