Svetuka kune chikuru content Svetuka kuenda kudocs navigation
Check
in English

Clearfix

Nekukurumidza uye nyore kujekesa zvakayangarara zviri mukati memudziyo nekuwedzera clearfix utility.

Zviri nyore kujekesa floats nekuwedzera .clearfix kune chinhu chemubereki . Inogonawo kushandiswa semusanganiswa.

Shandisa muHTML:

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

Iyo mixin source code:

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

Shandisa musanganiswa muSCSS:

.element {
  @include clearfix;
}

Muenzaniso unotevera unoratidza kuti clearfix inogona kushandiswa sei. Pasina iyo clearfix iyo yekuputira div yaisatenderedza yakatenderedza mabhatani ayo aizokonzera akatyoka dhizaini.

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>