in English
Soilleireachadh
Glan gu sgiobalta agus gu furasta susbaint fleòdraidh taobh a-staigh soitheach le bhith a’ cur goireas clearfix ris.
Dèan soilleir gu furasta float
le bhith a’ cur .clearfix
ris an eileamaid phàrant . Faodar a chleachdadh cuideachd mar mixin.
<div class="clearfix">...</div>
// Mixin itself
@mixin clearfix() {
&::after {
display: block;
content: "";
clear: both;
}
}
// Usage as a mixin
.element {
@include clearfix;
}
Tha an eisimpleir a leanas a’ sealltainn mar a ghabhas an clearfix a chleachdadh. Às aonais an fhuasgladh soilleir cha bhiodh an div fillte a’ dol timcheall nam putanan a dh’ adhbhraicheadh cruth briste.
<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>