← Back to Bootstrap Course | Chapter 7: Components — Cards & Alerts | Lesson 7 of 7

Progress Bars क्या हैं

Progress bars दिखाते हैं कि एक task कितनी दूर पहुँचा है।

In this page:

  1. Progress Bars
Syntax
markup
<div class="progress">
  <div class="progress-bar" role="progressbar" style="width: 50%">50%</div>
</div>

Progress Bars

एक .progress wrapper एक .progress-bar hold करता है जिसकी width एक inline style (या w-* utilities) से set होती है। role="progressbar" और aria-valuenow, aria-valuemin, और aria-valuemax add करें।

Striped और animated variants .progress-bar-striped और .progress-bar-animated इस्तेमाल करते हैं, और कई bars stack हो सकते हैं।

Note: width style और aria-valuenow को same percentage पर set करें।

उदाहरण: Progress bars

markup
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="p-3">
<div class="container">
  <div class="progress mb-2" role="progressbar" aria-label="Basic" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar" style="width: 25%">25%</div></div>
  <div class="progress mb-2" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar bg-success progress-bar-striped progress-bar-animated" style="width: 60%">60%</div></div>
  <div class="progress" style="height: 20px"><div class="progress-bar bg-info" style="width: 40%"></div><div class="progress-bar bg-warning" style="width: 20%"></div></div>
</div>
</body>
</html>
Live Example
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. ARIA values missing होना
  2. Mismatched width और aria-valuenow
  3. animated stripes overuse करना
चैप्टर सारांश
  • progress, progress-bar wrap करता है
  • Width percentage दिखाती है
  • ARIA attributes इसे describe करते हैं
  • Striped और animated variants
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.