Mafere na isi ọdịnaya Gaa na ntugharị docs
in English

Ọganihu

Akwụkwọ na ihe atụ maka iji ogwe ọganihu omenala Bootstrap nke na-egosipụta nkwado maka ogwe ndị ekpokọtara, nzụlite eserese, na akara ederede.

Ka o si arụ ọrụ

A na-eji ihe HTML abụọ wuo ihe na-aga n'ihu, ụfọdụ CSS iji tọọ obosara, yana àgwà ole na ole. We don't use the HTML5 <progress>element , n'ịhụ na ị nwere ike tojupụtara ọganihu mmanya, animate ha, na-etinye ederede akara n'elu ha.

  • Anyị na-eji ya .progressdị ka ihe mkpuchi iji gosi uru bara uru nke ogwe ọganihu.
  • Anyị na-eji n'ime .progress-bargosi ọganihu dị ugbu a.
  • Nke .progress-bara chọrọ ụdị inline, klaasị ịba uru, ma ọ bụ omenala CSS iji tọọ obosara ha.
  • Nke .progress-barahụ na-achọkwa ụfọdụ rolena arianjirimara iji mee ka ọ nweta ya.

Tinye ihe niile ọnụ, ma ị nwere ihe atụ ndị a.

<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 na-enye ngwa ọrụ ole na ole maka ịtọ obosara . Dabere na mkpa gị, ndị a nwere ike inye aka na ịhazi ọganihu ngwa ngwa.

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

Akara aha

Tinye akara na ogwe ọganihu gị site na itinye ederede n'ime faịlụ .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>

Ogologo

Naanị ihe anyị na-edobere heighturu na .progress, yabụ ọ bụrụ na ị gbanwee uru ahụ, nke dị n'ime .progress-barga-emegharị ya ozugbo.

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

Ndabere

Jiri klaasị ịba uru n'okirikiri iji gbanwee ọdịdị nke ogwe ọganihu n'otu n'otu.

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

Otutu mmanya

Tinye ọtụtụ ogwe ọganihu n'ime akụrụngwa ọganihu ma ọ bụrụ na ịchọrọ.

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

Ekewapụ

Tinye .progress-bar-stripedna nke ọ bụla .progress-bariji tinye eriri site na CSS gradient n'elu agba ndabere mmanya ọganihu.

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

Uriri na-emegharị anya

Enwere ike ịmegharị gradient nke eriri. Tinye .progress-bar-animatedn'ime .progress-barka emee ọnyá ndị dị n'aka nri gaa n'aka ekpe site na animation 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

Mgbanwe

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

Igwe igodo

Eji maka imepụta animation CSS maka .progress-bar-animated. Agụnyere na scss/_progress-bar.scss.

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