Salá koleka na makambo ya ntina Salta na navigation ya docs
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.

Salelá na HTML:

<div class="clearfix">...</div>

Code ya source ya mixin:

@mixin clearfix() {
  &::after {
    display: block;
    clear: both;
    content: "";
  }
}

Salelá mixin na SCSS:

.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-start">Example Button floated left</button>
  <button type="button" class="btn btn-secondary float-end">Example Button floated right</button>
</div>