Lesson 13: Progress Bars in Bootstrap 5

In this article, QuanTriMang will continue to guide you on using Bootstrap to create progress bars.

In this article, QuanTriMang will continue to guide you on using Bootstrap to create progress bars. The purpose of a progress bar is to show the upload process or workflow progress.

 

Progress bars use CSS3 transition effects and animations to create various visual effects. However, these features are not supported in IE 9 and earlier versions of Firefox , and Opera 12 also does not support animations.

Default progress bar

To create a basic process by default, follow these steps:

  • Add one tag along with the class..progress
  • Next, in the tag above, add a blank space with the .progress-baraccompanying class.
  • Add a style attribute with the width expressed as a percentage, for example, mstyle="50%"to show a progress bar at 50%.

It would be something like this:

 

The complete HTML code for a progress bar would look like this:

 Ví dụ Bootstrap - QuanTriMang 

Basic progress bar

To create a default progress bar, add the `.progress` class to the 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.

 

Color progress bar

By default, the progress bar is blue. Use any background classes in the context to change its color:

The example below will help you visualize it better:

 TipsMake.com - Boostrap 

Color progress bar

Use any color class to change the color of the progress bar:

  







 

Striped progress bar

To create a striped progress bar:

  • Add with class .progressand .progress-striped.
  • Next, inside above, add an empty box with the class . progress-barand class progress-bar-*, where * can be success, info, warning, or danger.
  • Add a style attribute with the width expressed as a percentage, for example style = '60%', , indicating that the progress bar is at 60%.

For example:

 Ví dụ Boostrap 

Striped progress bar

The `.progress-bar-striped` class adds stripes to the progress bar:

 



 

The progress bar has animations.

To create an animated progress bar:

  • Add with class .progressand .progress-striped. Also, add class .activeto .progress-striped.
  • Next, in the above section, add an empty field with the class .progress-bar.
  • Add a style attribute with the width expressed as a percentage. For example, `style = "60%"` - the progress bar is at 60%.

For example, the following would create a gradient effect from right to left:

 Ví dụ Boostrap 

Dynamic progress bar

Add the class .progress-bar-animated to make the progress bar dynamic:

Stacked progress bars

You can even stack multiple progress bars. Place multiple progress bars in the same .progress file to stack them, as shown in the example below:

 Bootstrap TipsMake.com 

Stack progress bars

Create a stacked progress bar by placing multiple bars within the same div tag with the class="progress":

 Không gian miễn phí Cảnh báo Nguy hiểm 

Above are the basics you need to know about creating a progress bar in Bootstrap 5. As you can see, just understanding the basic tabs is enough to create a beautiful progress bar using Bootstrap 5.

Related posts
Other Program articles
  • Lesson 12: Badges in Bootstrap 5

    badge trong bootstrap rất cần thiết khi phát triển web và ứng dụng. Ở bài này, hãy cùng tipsmake.com.com tìm hiểu cách dùng badge trong bootstrap như thế nào nhé!
  • Lesson 11: Button Groups in Bootstrap 5

    btn-group bootstrap 5 là gì? cách tạo hay dùng button trong bootstrap 5 như thế nào? hãy cùng tipsmake.com.com tìm hiểu nhé!
  • Lesson 10: Buttons in Bootstrap 5 - How to create different types of buttons in Bootstrap

    btn php hay button bootstrap 5 là gì? bài viết sẽ tổng hợp cho bạn các loại button và cách tạo chúng trong bootstrap như thế nào nhé!
  • Lesson 9: Alerts in Bootstrap 5

    alert bootstrap 5 là gì? bootstrap 5 alert là một thành phần quan trọng trong phát triển web, ứng dụng. dưới đây là mọi điều bạn cần biết về alert trong bootstrap 5.
  • Lesson 8: Jumbotron in Bootstrap 5

    trong bootstrap, jumbotron là một box màu xám chứa văn bản, với mục đích là tăng thêm sự chú ý cho văn bản trong đó. khi cảm thấy văn bản/thông tin nào thật quan trọng, cần phải làm cho nó xuất hiện thật lớn, thật gây chú ý, bạn chỉ cần viết nó trong jumbotron.
  • Lesson 6: Tables in Bootstrap 5

    table trong bootstrap là gì? cách tạo table trong bootstrap như thế nào? hãy cùng tipsmake.com.com tìm hiểu nhé!
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup