in English
Tozalash
Clearfix yordam dasturini qo'shish orqali konteyner ichidagi suzuvchi tarkibni tez va oson tozalang.
Asosiy elementgafloat
qo'shish orqali s ni osongina tozalang . Aralashma sifatida ham foydalanish mumkin..clearfix
HTMLda foydalaning:
<div class="clearfix">...</div>
Mixin manba kodi:
@mixin clearfix() {
&::after {
display: block;
clear: both;
content: "";
}
}
SCSS da miksindan foydalaning:
.element {
@include clearfix;
}
Quyidagi misol aniq tuzatishdan qanday foydalanish mumkinligini ko'rsatadi. Aniq tuzatishsiz o'rash div tugmalari atrofida aylanmaydi, bu esa tartibning buzilishiga olib keladi.
<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>