Source

Hlakisa

Hlakola ka potlako le ha bonolo litaba tse phaphametseng ka har'a sets'oants'o ka ho eketsa sesebelisoa sa clearfix.

Hlakola ha bonolo floatka ho kenyelletsa .clearfix karolo ea motsoali . E ka boela ea sebelisoa e le mixin.

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

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

Mohlala o latelang o bontša kamoo clearfix e ka sebelisoang kateng. Ntle le clearfix, div e phuthelang e ne e ke ke ea potoloha likonopo tse ka bakang sebopeho se robehileng.

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