選單
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Bootstrap 4 Progress Bars


基本進度條

Progress bar can be used to show a user how far along he/she is in a process.

25% Complete
50% Complete
100% Complete

To create a default progress bar, add a .progress class to a container element and add the .progress-bar class to its child element. Use the CSS width property to set the width of the progress bar

示例

<div class="progress">
  <div class="progress-bar" style="width:70%"></div>
</div>
自己動手試一試 »

Progress Bar Height




The height of the progress bar is 16px by default. Use the CSS height property to change it. Note that you must set the same height for the progress container and the progress bar

示例

<div class="progress" style="height:20px">
  <div class="progress-bar" style="width:40%;height:20px"></div>
</div>
自己動手試一試 »

進度條標籤

Add text inside the progress bar to show the visible percentage

70%

示例

<div class="progress">
  <div class="progress-bar" style="width:70%">70%</div>
</div>
自己動手試一試 »


彩色進度條










By default, the progress bar is blue (primary). Use any of the Bootstrap 4 contextual background classes to change its color

示例

<!-- Blue -->
<div class="progress">
  <div class="progress-bar" style="width:10%"></div>
</div>

<!-- Green -->
<div class="progress">
  <div class="progress-bar bg-success" style="width:20%"></div>
</div>

<!-- Turquoise -->
<div class="progress">
  <div class="progress-bar bg-info" style="width:30%"></div>
</div>

<!-- Orange -->
<div class="progress">
   <div class="progress-bar bg-warning" style="width:40%"></div>
</div>

<!-- Red -->
<div class="progress">
  <div class="progress-bar bg-danger" style="width:50%"></div>
</div>

<!-- White -->
<div class="progress border">
  <div class="progress-bar bg-white" style="width:60%"></div>
</div>

<!-- Grey -->
<div class="progress">
  <div class="progress-bar bg-secondary" style="width:70%"></div>
</div>

<!-- Light Grey -->
<div class="progress border">
  <div class="progress-bar bg-light" style="width:80%"></div>
</div>

<!-- Dark Grey -->
<div class="progress">
  <div class="progress-bar bg-dark" style="width:90%"></div>
</div>
自己動手試一試 »

條紋進度條






Use the .progress-bar-striped class to add stripes to the progress bars

示例

<div class="progress">
  <div class="progress-bar progress-bar-striped" style="width:40%"></div>
</div>
自己動手試一試 »

動畫進度條


Add the .progress-bar-animated class to animate the progress bar

示例

<div class="progress-bar progress-bar-striped progress-bar-animated" style="width:40%"></div>
自己動手試一試 »

Multiple Progress Bars

進度條也可以堆疊

免費空間
警告
危險

示例

<div class="progress">
  <div class="progress-bar bg-success" style="width:40%">
    免費空間
  </div>
  <div class="progress-bar bg-warning" style="width:10%">
    警告
  </div>
  <div class="progress-bar bg-danger" style="width:20%">
    危險
  </div>
</div>
自己動手試一試 »

×

聯絡銷售

如果您想將 W3Schools 服務用於教育機構、團隊或企業,請傳送電子郵件給我們
sales@w3schools.com

報告錯誤

如果您想報告錯誤,或想提出建議,請傳送電子郵件給我們
help@w3schools.com

W3Schools 經過最佳化,旨在方便學習和培訓。示例可能經過簡化,以提高閱讀和學習體驗。教程、參考資料和示例會不斷審查,以避免錯誤,但我們無法保證所有內容的完全正確性。使用 W3Schools 即表示您已閱讀並接受我們的使用條款Cookie 和隱私政策

版權所有 1999-2024 Refsnes Data。保留所有權利。W3Schools 由 W3.CSS 提供支援