I need some help with my Angular app. I am currently working on creating a progress bar, but I am facing some issues with the alignment of the bars. Here is the code snippet that I have used:
CSS:
.progressbar {
position: relative;
height: 56px;
margin: 5px;
background: linear-gradient(to right, red 0%, yellow 50%, green 34%) left/var(--p, 100%) fixed, lightgray;
box-shadow: inset 0px -2px 5px rgba(0, 0, 0, 0.5);
animation: change 1s linear infinite;
}
.progressbar:after {
content: '';
position: absolute;
right: 0;
width: 0;
height: 0;
border-top: 28px solid white;
border-bottom: 28px solid white;
border-left: 28px solid transparent;
}
.progressbar:before {
content: '';
position: absolute;
left: 0;
width: 0;
height: 0;
border-top: 28px solid transparent;
border-bottom: 28px solid transparent;
border-left: 28px solid white;
}
.bar {
display:flex;
gap:10px;
}
HTML:
<div class="bar">
<div class="progressbar" style="width:100%;"></div>
<div class="progressbar" style="width:100%;"></div>
<div class="progressbar" style="width:100%;"></div>
</div>
If you open the Fiddle link here, you will see the current implementation of the progress bar.
The issue lies in the fact that there is a gap between the multiple gradient bars and their alignment is not proper. I want them to be equally spaced and close to each other like the image here. How can I achieve this desired layout?