I am working on an angular app. I am making a progress bar in it. My code is as follows:
CSS:
.progressbar {
position: relative; /* for position absolute of pseudo element work */
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; /* Your background color*/
border-bottom: 28px solid white; /* Your background color*/
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; /* Your background color*/
}
.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>
My Fiddle is as follows:
http://jsfiddle.net/9hL0nb4a/9/
Problem in my code is this I am making a progress bar combining multiple gradient bar. Because of which there is a gap between them and alignment is not proper.
I want to make bars of this progress bar equally spaced and close to each other as shown in below image
How can I do that?