Okukulakulana
Ebiwandiiko n'ebyokulabirako by'okukozesa Bootstrap custom progress bars ezirimu obuwagizi ku bbaala ezitumbiddwa, ebifaananyi ebirina obulamu, n'ebiwandiiko ebiwandiikiddwa.
Engeri gye kikola
Ebitundu by’enkulaakulana bizimbibwa n’ebintu bibiri ebya HTML, ebimu CSS okuteeka obugazi, n’ebintu ebitonotono. Tetukozesa elementi ya HTML5<progress>
, okukakasa nti osobola okuteeka ebbaala z’enkulaakulana, okuzifuula obulamu, n’okuziteekako obubonero bw’ebiwandiiko.
- Tukozesa the
.progress
nga wrapper okulaga max value ya progress bar. - Tukozesa eby’omunda
.progress-bar
okulaga enkulaakulana okutuuka wano. - The
.progress-bar
yeetaaga sitayiro ya mu layini, ekibiina ky'omugaso, oba CSS eya bulijjo okuteeka obugazi bwazo. - The
.progress-bar
era yeetaaga ebimurole
n'ebintuaria
okugifuula etuukirirwa, omuli erinnya erituukirirwa (nga okozesaaria-label
,aria-labelledby
, oba erifaananako bwetyo).
Ebyo byonna biteeke wamu, era olina ebyokulabirako bino wammanga.
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Basic example" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Basic example" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Basic example" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Basic example" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Bootstrap egaba ebikozesebwa ebitonotono eby'okuteekawo obugazi . Okusinziira ku byetaago byo, bino biyinza okuyamba mu kutegeka amangu enkulaakulana.
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-label="Basic example" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Ebiwandiiko ebiwandiikibwako
Yongera ebiwandiiko ku bbaala zo ez'enkulaakulana ng'oteeka ebiwandiiko munda mu .progress-bar
.
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Example with label" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>
Obuwanvu
Tuteeka height
omuwendo gwokka ku .progress
, kale bw’okyusa omuwendo ogwo ogw’omunda .progress-bar
gujja kukyusa obunene bw’omuntu okusinziira ku ekyo.
<div class="progress" style="height: 1px;">
<div class="progress-bar" role="progressbar" aria-label="Example 1px high" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress" style="height: 20px;">
<div class="progress-bar" role="progressbar" aria-label="Example 20px high" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Ebifaananyi eby’emabega
Kozesa kiraasi z’ebikozesebwa eby’emabega okukyusa endabika y’embaawo z’enkulaakulana ssekinnoomu.
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" aria-label="Success example" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar bg-info" role="progressbar" aria-label="Info example" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar bg-warning" role="progressbar" aria-label="Warning example" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" aria-label="Danger example" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Okutuusa amakulu mu tekinologiya ayamba
Okukozesa langi okwongera amakulu kiwa ekiraga ekirabika kyokka, ekitajja kutuusibwa eri abakozesa tekinologiya ayamba – gamba ng’ebisoma ku ssirini. Kakasa nti amawulire agalagirwa langi oba geeyoleka okuva mu birimu byennyini (okugeza ekiwandiiko ekirabika), oba gateekebwamu okuyita mu ngeri endala, gamba ng’ebiwandiiko ebirala ebikwekebwa ne .visually-hidden
kiraasi.
Ebbaala eziwera
Teekamu ebbaala z’enkulaakulana eziwera mu kitundu ky’enkulaakulana bw’oba weetaaga.
<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="Segment one" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-success" role="progressbar" aria-label="Segment two" style="width: 30%" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-info" role="progressbar" aria-label="Segment three" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Emisono egy’enjawulo
Okwongera .progress-bar-striped
ku kyonna .progress-bar
okusiiga omuguwa ng'oyita mu CSS gradient ku langi y'emabega y'ebbaala y'enkulaakulana.
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-label="Default striped example" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" aria-label="Success striped example" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-info" role="progressbar" aria-label="Info striped example" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-warning" role="progressbar" aria-label="Warning striped example" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped bg-danger" role="progressbar" aria-label="Danger striped example" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Emisono egy’obulamu
Gradient eriko emisono nayo esobola okubeera ey’obulamu. Okwongerako .progress-bar-animated
ku .progress-bar
okusobola okukola emisono obulamu okuva ku ddyo okudda ku kkono nga oyita mu CSS3 animations.
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-label="Animated striped example" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
</div>
CSS
Enkyukakyuka ezikyukakyuka
Yayongerwako mu v5.2.0Nga ekitundu ku nkola ya Bootstrap egenda ekulaakulana enkyukakyuka za CSS, ebbaala z’enkulaakulana kati zikozesa enkyukakyuka za CSS ez’omu kitundu ku .progress
for enhanced real-time customization. Emiwendo gy'enkyukakyuka za CSS giteekebwawo nga giyita mu Sass, kale okulongoosa Sass kukyawagirwa, nakyo.
--#{$prefix}progress-height: #{$progress-height};
@include rfs($progress-font-size, --#{$prefix}progress-font-size);
--#{$prefix}progress-bg: #{$progress-bg};
--#{$prefix}progress-border-radius: #{$progress-border-radius};
--#{$prefix}progress-box-shadow: #{$progress-box-shadow};
--#{$prefix}progress-bar-color: #{$progress-bar-color};
--#{$prefix}progress-bar-bg: #{$progress-bar-bg};
--#{$prefix}progress-bar-transition: #{$progress-bar-transition};
Enkyukakyuka za Sass
$progress-height: 1rem;
$progress-font-size: $font-size-base * .75;
$progress-bg: $gray-200;
$progress-border-radius: $border-radius;
$progress-box-shadow: $box-shadow-inset;
$progress-bar-color: $white;
$progress-bar-bg: $primary;
$progress-bar-animation-timing: 1s linear infinite;
$progress-bar-transition: width .6s ease;
Ebisumuluzo ebikulu
Ekozesebwa okukola ebifaananyi bya CSS ebya .progress-bar-animated
. Ebirimu mu scss/_progress-bar.scss
.
@if $enable-transitions {
@keyframes progress-bar-stripes {
0% { background-position-x: $progress-height; }
}
}