<div class="container">
<div class="animation progressAnimation"></div>
</div>
.container {
width: 400px;
height: 200px;
border: 1px solid black;
margin: 100px auto;
}
.animation {
background-image: linear-gradient(to right, green, green);
height: 200px;
opacity: 0.7;
}
.progressAnimation {
animation: progressPercent 5s linear forwards;
}
@keyframes progressPercent {
0% {
width: 0;
}
100% {
width: 400px;
}
}