in English

Inqubekelaphambili

Amadokhumenti nezibonelo zokusebenzisa amabha enqubekela-phambili e-Bootstrap afaka usekelo lwamabha astakiwe, ingemuva eligqwayizayo, namalebula ombhalo.

Isebenza kanjani

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 .progressnjengesonga ukukhombisa inani eliphezulu lebha yokuqhubeka.
  • Sisebenzisa ingaphakathi .progress-barukukhombisa inqubekelaphambili kuze kube manje.
  • .progress-barIdinga isitayela esisemgqeni, isigaba sokusetshenziswa, noma i-CSS yangokwezifiso ukuze usethe ububanzi bazo .
  • I .progress-barfuthi idinga okunye rolekanye arianezimfanelo 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>

Amalebula

Engeza amalebula kubha yakho yokuqhubeka ngokubeka umbhalo ngaphakathi kwe- .progress-bar.

25%
<div class="progress">
  <div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>

Ubude

Sisetha kuphela heightinani ku- .progress, ngakho-ke uma ushintsha lelo nani elingaphakathi lizoshintsha .progress-barusayizi 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>

Ingemuva

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>

Amabha amaningi

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>

Inemithende

Engeza .progress-bar-stripedkunoma yikuphi .progress-barukuze 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>

Imigqa egqwayizayo

I-gradient enemigqa nayo ingagqwayiza. Engeza .progress-bar-animatedukuze .progress-barugqwayize imithende kwesokudla kuye kwesokunxele ngokusebenzisa opopayi be-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>