Yeqela kokuqukethwe okuyinhloko Yeqela ku-docs navigation
in English

Inqubekelaphambili

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

Isebenza kanjani

Izingxenye zenqubekelaphambili zakhiwe ngezinto ezimbili ze-HTML, enye i-CSS ukusetha ububanzi, nezibaluli ezimbalwa. Asisebenzisi i - elementi ye -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 ukusetha 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 usebenzisa 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>

Sass

Okuguquguqukayo

$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;

Ozimele abangukhiye

Isetshenziselwa ukudala izithombe ze-CSS ze- .progress-bar-animated. Kufakwe ku scss/_progress-bar.scss.

@if $enable-transitions {
  @keyframes progress-bar-stripes {
    0% { background-position-x: $progress-height; }
  }
}