Tsibela kumxholo ophambili Tsiba uye kukhangelo lwamaxwebhu
in English

Ukulungisa

Ucoca ngokukhawuleza nangokulula umxholo odadayo ngaphakathi kwesikhongozeli ngokongeza into eluncedo ecacileyo.

Cacisa ngokulula floats ngokongeza .clearfix kwinto engumzali . Inokusetyenziswa kwakhona njengomxube.

Sebenzisa kwi-HTML:

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

Ikhowudi yomthombo womxube:

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

Sebenzisa umxube kwi-SCSS:

.element {
  @include clearfix;
}

Lo mzekelo ulandelayo ubonisa indlela i-clearfix enokusetyenziswa ngayo. Ngaphandle kokucoca i-div yokusonga ayinakujikeleza amaqhosha anokubangela ubeko olwaphukileyo.

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