in English
Bobongisi ya polele
Noki mpe na pete effacer contenus flotté na kati ya conteneur na kobakisa utilitaire ya clearfix.
Effacer float
s facilement na kobakisa .clearfix
na élément parent . Ekoki mpe kosalelama lokola mixin.
Salelá na HTML:
<div class="clearfix">...</div>
Code ya source ya mixin:
@mixin clearfix() {
&::after {
display: block;
clear: both;
content: "";
}
}
Salelá mixin na SCSS:
.element {
@include clearfix;
}
Ndakisa oyo elandi ezali kolakisa ndenge nini bakoki kosalela clearfix. Sans clearfix div ya enveloppe elingaki ko span te zinga zinga ya ba boutons oyo elingaki kosala que layout epanzana.
<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>