Maendeleo
Nyaraka na mifano ya kutumia upau maalum wa maendeleo wa Bootstrap unaoangazia pau zilizopangwa kwa rafu, mandharinyuma zilizohuishwa na lebo za maandishi.
Vipengele vya maendeleo vimejengwa kwa vipengele viwili vya HTML, baadhi ya CSS ili kuweka upana, na sifa chache. Hatutumii kipengele cha HTML5<progress>
, kuhakikisha kuwa unaweza kuweka pau za maendeleo, kuzihuisha, na kuweka lebo za maandishi juu yake.
- Tunatumia
.progress
kama kanga kuashiria thamani ya juu zaidi ya upau wa maendeleo. - Tunatumia ya ndani
.progress-bar
kuashiria maendeleo hadi sasa. .progress-bar
Inahitaji mtindo wa ndani, darasa la matumizi, au CSS maalum ili kuweka upana wao .- Pia
.progress-bar
inahitaji baadhirole
naaria
sifa kuifanya ipatikane.
Weka yote pamoja, na unayo mifano ifuatayo.
<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 hutoa huduma chache kwa kuweka upana . Kulingana na mahitaji yako, haya yanaweza kusaidia kwa usanidi wa haraka wa maendeleo.
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
Ongeza lebo kwenye pau zako za maendeleo kwa kuweka maandishi ndani ya .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>
Tunaweka tu height
thamani kwenye .progress
, kwa hivyo ukibadilisha thamani hiyo ya ndani .progress-bar
itabadilisha ukubwa kiotomatiki ipasavyo.
<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>
Tumia madarasa ya matumizi ya usuli ili kubadilisha mwonekano wa pau za maendeleo binafsi.
<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>
Jumuisha pau nyingi za maendeleo katika sehemu ya maendeleo ikiwa unahitaji.
<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>
Ongeza .progress-bar-striped
kwa yoyote .progress-bar
ili kuweka mstari kupitia gradient ya CSS juu ya rangi ya mandharinyuma ya upau wa maendeleo.
<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>
Upinde rangi yenye milia unaweza pia kuhuishwa. Ongeza .progress-bar-animated
kwa .progress-bar
kuhuisha milia kulia kwenda kushoto kupitia uhuishaji wa CSS3.