in English
Clearfix
“Clearfix” programmasyny goşup, konteýneriň içinde ýüzýän mazmuny çalt we aňsat arassalaň.
Ene elementinefloat
goşup , aňsatlyk bilen arassalaň . Garyndy hökmünde hem ulanylyp bilner..clearfix
HTML-de ulanyň:
<div class="clearfix">...</div>
Garyndynyň deslapky kody:
@mixin clearfix() {
&::after {
display: block;
clear: both;
content: "";
}
}
Garyndyny SCSS-de ulanyň:
.element {
@include clearfix;
}
Aşakdaky mysal, “Clearfix” -iň nädip ulanylyp bilinjekdigini görkezýär. “Clearfix” bolmasa, gaplama diwiniň bozulmagyna sebäp boljak düwmeleriň töwereginde aýlanmazdy.
<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>