Source

Progress

Dokumentazzjoni u eżempji għall-użu tal-vireg tal-progress tad-dwana tal-Bootstrap li fihom appoġġ għal bars f'munzelli, sfondi animati, u tikketti tat-test.

Kif taħdem

Il-komponenti tal-progress huma mibnija b'żewġ elementi HTML, xi CSS biex tissettja l-wisa ', u ftit attributi. Aħna ma nużawx l- element HTML5<progress> , u niżguraw li inti tista 'stack bars tal-progress, tanimahom, u tpoġġi tikketti tat-test fuqhom.

  • Aħna nużaw il- .progressbħala tgeżwir biex jindikaw il-valur massimu tal-bar tal-progress.
  • Aħna nużaw l-interjuri .progress-barbiex nindikaw il-progress s'issa.
  • Il .progress-barteħtieġ stil inline, klassi ta 'utilità, jew CSS tad-dwana biex tissettja l-wisa' tagħhom.
  • Il .progress-barteħtieġ ukoll xi roleu ariaattributi biex jagħmluha aċċessibbli.

Poġġi dan kollu flimkien, u għandek l-eżempji li ġejjin.

<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 jipprovdi numru żgħir ta ' utilitajiet għall-issettjar tal-wisa' . Skont il-bżonnijiet tiegħek, dawn jistgħu jgħinu fil-konfigurazzjoni tal-progress malajr.

<div class="progress">
  <div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>

Tikketti

Żid it-tikketti mal-vireg tal-progress tiegħek billi tpoġġi test fi ħdan il- .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>

Għoli

Aħna nissettjaw biss heightvalur fuq il- .progress, għalhekk jekk tibdel dak il-valur il-parti ta 'ġewwa .progress-barawtomatikament terġa' d-daqs xieraq.

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

Sfondi

Uża klassijiet ta 'utilità fl-isfond biex tbiddel id-dehra tal-vireg tal-progress individwali.

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

Bars multipli

Inkludi diversi bars tal-progress f'komponent tal-progress jekk għandek bżonn.

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

Strixxat

Żid .progress-bar-stripedma' kwalunkwe .progress-barbiex tapplika strixxa permezz ta' gradjent CSS fuq il-kulur tal-isfond tal-bar tal-progress.

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

Strixxi animati

Il-gradjent strixxat jista 'jkun animat ukoll. Żid .progress-bar-animatedma .progress-barbiex janima l-istrixxi dritt għal xellug permezz animazzjonijiet 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>