Horumar
Dukumeenti iyo tusaalooyin isticmaalka Bootstrap horumarka caadooyinka ee baararka muujinaya taageerada baararka is dulsaaran, asalka noole, iyo sumadaha qoraalka.
Sida ay u shaqeyso
Qaybaha horumarka waxa lagu dhisay laba curiye HTML ah, qaar CSS ah si loo dejiyo ballaca, iyo sifooyin kooban. Ma isticmaalno HTML5 <progress>
element , anagoo hubinayna inaad ku dhejin karto baararka horumarka, firfircooni, oo aad dhejin kartid qoraallada korkooda.
- Waxaan u isticmaalnaa
.progress
duub ahaan si aan u muujino qiimaha ugu badan ee bar horumarka. - Waxaan u isticmaalnaa gudaha
.progress-bar
si aan u muujinno horumarka ilaa hadda jira. - Waxay
.progress-bar
u baahan tahay qaab khad dhexdeed ah, fasalka utility, ama CSS caadadii si loo dejiyo ballacooda. - Waxay
.progress-bar
sidoo kale u baahan tahay qaarrole
iyoaria
sifooyin si looga dhigo mid la heli karo.
Isku soo wada duuboo, waxaadna haysataa tusaalooyinka soo socda.
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Bootstrap waxay ku siinaysaa gacan muggeed oo utility ah dejinta ballaca . Iyada oo ku xidhan baahiyahaaga, kuwani waxa laga yaabaa inay kaa caawiyaan habaynta horumarka degdega ah.
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Calaamadaha
Ku dar summadaada baararka horumarkaaga adiga oo qoraal gelinaya gudaha .progress-bar
.
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>
Dhererka
Kaliya waxaan dejinay height
qiimaha .progress
, markaa haddii aad bedesho qiimahaas gudaha .progress-bar
ayaa si toos ah u cabbiri doona si waafaqsan.
<div class="progress" style="height: 1px;">
<div class="progress-bar" role="progressbar" 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" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Asalkii hore
Isticmaal fasallada utility-ga asalka ah si aad u bedesho muuqaalka baararka horumarka shakhsi ahaaneed.
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" 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" 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" 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" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Baararka badan
Ku dar baararka horumarka badan ee qaybta horumarka haddii aad u baahan tahay.
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-success" role="progressbar" style="width: 30%" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-info" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Xariifnimo
Ku dar .progress-bar-striped
mid kasta .progress-bar
si aad u marso xariijimaha CSS ee midabka asalka ah ee horumarka.
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" 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" 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" 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" 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" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Xariijimo firfircoon
Dhererka xariijimaha leh ayaa sidoo kale la dhaqdhaqaajin karaa. Ku dar .progress-bar-animated
si .progress-bar
aad u dhaqaajiso xariijimaha midig ilaa bidix adoo isticmaalaya animations CSS3.
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
</div>
Sass
Kala duwanaansho
$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;
Keyframes
Loo isticmaalo abuurista animations CSS ee .progress-bar-animated
. Waxaa ku scss/_progress-bar.scss
jira
@if $enable-transitions {
@keyframes progress-bar-stripes {
0% { background-position-x: $progress-height; }
}
}