Inqubekelaphambili
Amadokhumenti nezibonelo zokusebenzisa amabha enqubekela-phambili e-Bootstrap afaka usekelo lwamabha astakiwe, ingemuva elipopayi, namalebula ombhalo.
Izingxenye zokuqhubeka zakhiwe ngezici ezimbili ze-HTML, enye i-CSS yokusetha ububanzi, kanye nezibaluli ezimbalwa. Asisebenzisi isici se -HTML5<progress>
, siqinisekisa ukuthi ungakwazi ukunqwabelanisa amabha enqubekelaphambili, uwaphilise, futhi ubeke amalebula ombhalo phezu kwawo.
- Sisebenzisa
.progress
njengesonga ukukhombisa inani eliphezulu lebha yokuqhubeka. - Sisebenzisa ingaphakathi
.progress-bar
ukukhombisa inqubekelaphambili kuze kube manje. .progress-bar
Idinga isitayela esisemgqeni, isigaba sokusetshenziswa, noma i-CSS yangokwezifiso ukuze usethe ububanzi bazo .- I
.progress-bar
futhi idinga okunyerole
kanyearia
nezimfanelo ukuze ifinyeleleke.
Kuhlanganise konke lokho, futhi unezibonelo ezilandelayo.
<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>
I-Bootstrap inikeza izinsiza ezimbalwa zokusetha ububanzi . Ngokuya ngezidingo zakho, lezi zingasiza ekulungiseleleni ngokushesha ukuqhubeka.
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Engeza amalebula kubha yakho yokuqhubeka ngokubeka umbhalo ngaphakathi kwe- .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>
Sisetha kuphela height
inani ku- .progress
, ngakho-ke uma ushintsha lelo nani elingaphakathi lizoshintsha .progress-bar
usayizi ngokuzenzakalelayo ngokufanele.
<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>
Sebenzisa amakilasi ensiza engemuva ukuze uguqule ukubukeka kwebha yokuqhubeka ngayinye.
<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>
Faka phakathi imigoqo yenqubekela-phambili eminingi engxenyeni yenqubekelaphambili uma uyidinga.
<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>
Engeza .progress-bar-striped
kunoma yikuphi .progress-bar
ukuze usebenzise umugqa nge-CSS gradient phezu kombala wangemuva webha yokuqhubeka.
<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>
I-gradient enemigqa nayo ingagqwayiza. Engeza .progress-bar-animated
ukuze .progress-bar
ugqwayize imithende kwesokudla kuye kwesokunxele usebenzisa opopayi be-CSS3.