Yeqela kokuqukethwe okuyinhloko Yeqela ku-docs navigation
in English

Sula ukulungisa

Sula ngokushesha futhi kalula okuqukethwe okuntantayo ngaphakathi kwesiqukathi ngokwengeza insiza yokulungisa okucacile.

Sula kalula floats ngokungeza .clearfix isici esingumzali . Ingasetshenziswa futhi njenge-mixin.

Sebenzisa ku-HTML:

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

Ikhodi yomthombo we-mixin:

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

Sebenzisa i-mixin ku-SCSS:

.element {
  @include clearfix;
}

Isibonelo esilandelayo sibonisa ukuthi i-clearfix ingasetshenziswa kanjani. Ngaphandle kokulungiswa okucacile i-div yokugoqa ngeke idlule izinkinobho ezingadala isakhiwo esiphukile.

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