Tsoelo-pele
Litokomane le mehlala ea ho sebelisa mekoallo ea tsoelo-pele ea Bootstrap e nang le ts'ehetso bakeng sa mekoallo e behiloeng, lipopae le lileibole tsa mongolo.
Kamoo e sebetsang kateng
Likarolo tsa tsoelo-pele li hahiloe ka likarolo tse peli tsa HTML, tse ling tsa CSS ho beha bophara, le litšobotsi tse 'maloa. Ha re sebelise karolo ea HTML5<progress>
, ho etsa bonnete ba hore u ka bokella mekoallo ea tsoelo-pele, ua e phelisa, le ho beha lileibole holim'a eona.
- Re sebelisa
.progress
e le sephutheloana ho bonts'a boleng bo phahameng ba sebaka sa tsoelo-pele. - Re sebelisa bokahare
.progress-bar
ho bontša tsoelo-pele ho fihlela joale. - The
.progress-bar
e hloka setaele se kahare, sehlopha sa lisebelisoa, kapa CSS ea tloaelo ho beha bophara ba tsona. - E
.progress-bar
boetse e hloka tse lingrole
learia
litšoaneleho ho etsa hore e fumanehe.
Kopanya seo kaofela, 'me u na le mehlala e latelang.
<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 e fana ka lisebelisoa tse 'maloa bakeng sa ho seta bophara . Ho ipapisitse le litlhoko tsa hau, tsena li ka u thusa ho hlophisa tsoelo-pele kapele.
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Labels
Kenya lileibole ho mekoallo ea tsoelo-pele ea hau ka ho beha mongolo ka har'a .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>
Bophahamo
Re beha height
boleng feela ho .progress
, kahoo ha o fetola boleng boo bokahare bo .progress-bar
tla fetoha ka tsela e nepahetseng.
<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>
Semelo
Sebelisa litlelase tsa ts'ebeliso ea morao-rao ho fetola ponahalo ea mekoallo ea tsoelo-pele ea motho ka mong.
<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>
Li-bar tse ngata
Kenyelletsa mekoallo e mengata ea tsoelo-pele karolong ea tsoelo-pele haeba u e hloka.
<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>
E methalo
Eketsa .progress-bar-striped
ho eng kapa eng .progress-bar
ho sebelisa mola ka CSS gradient holim'a bokamorao ba 'mala oa sebaka sa tsoelo-pele.
<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>
Methalo e phelang
The gradient e metsero e ka boela ea phelisoa. Eketsa .progress-bar-animated
ho .progress-bar
ho phelisa metsero ka ho le letona ho ea ho le letšehali ka litšoantšo tsa 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>