
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Create a Bootstrap Progress Bar with Different Styles
Follow the below given steps to create a progress bar with different styles −
- Add a <div> with a class of .progress.
- Next, inside the above <div>, add an empty <div> with a class of .progress-bar and class progress-bar-* where * could be success, info, warning, danger.
- Add a style attribute with the width expressed as a percentage. Say, for example, style = "60%"; indicates that the progress bar was at 60%.
The progress bars created below are for showing positive action and key information −
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href="/https/www.tutorialspoint.com/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <h2>Progress Bars</h2> <div class = "progress"> <div class = "progress-bar progress-bar-success" role = "progressbar" aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: 90%;"> <span class = "sr-only">90% Complete (Sucess)</span> </div> </div> <div class = "progress"> <div class = "progress-bar progress-bar-info" role = "progressbar" aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: 30%;"> <span class = "sr-only">30% Complete (info)</span> </div> </div> </body> </html>
Advertisements