I am currently using a Bootstrap "loading" style progress bar to indicate the progress of a survey. The progress bar code looks like this:
html
<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>
However, I would like to change the style of the progress bar to a dot style, where each step of the survey is represented by a dot. For example:
I have searched through Bootstrap documentation and tried different CSS styles, but I couldn’t find a straightforward way to achieve the dot style. Can someone please guide me on how to modify the progress bar to display as dots rather than a solid bar? Any help or code examples would be greatly appreciated. Thank you!
2
Answers
To create a dot style progress bar, you can make use of Bootstrap’s flexbox and create a series of dots within a container. Each dot represents a step in the survey, and you can update the class of the dots dynamically to show the progress.
Try this code.
I created it from scratch. If you have any question feel free to ask.