Source

Clearfix

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

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

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

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

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

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