Pitani kuzinthu zazikulu Pitani kumayendedwe adocs
Check
in English

Clearfix

Chotsani mwachangu komanso mosavuta zomwe zidayandama mkati mwa chidebe powonjezera zida za clearfix.

Kumveka bwino floats powonjezera .clearfix ku chinthu cha makolo . Itha kugwiritsidwanso ntchito ngati mixin.

Gwiritsani ntchito mu HTML:

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

Mixin source code:

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

Gwiritsani ntchito mixin mu SCSS:

.element {
  @include clearfix;
}

Chitsanzo chotsatirachi chikuwonetsa momwe clearfix ingagwiritsire ntchito. Popanda clearfix kukulunga div sikungayende mozungulira mabatani omwe angayambitse kusanjika.

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