JSFiddle - React, Tailwind, and code Playground
by jamesdh
HTML
<div class="progress">
</div>
CSS
@-webkit-keyframes progress-bar-complete-reset {
10% { width: 100% }
40% { width: 100%; right: 0px; }
45% { width: 100%; right: 0px; opacity: 1}
55% { width: 0%; right: 0px; opacity: 0;}
100% { width: 0%; opacity: 0;}
}
@keyframes progress-bar-complete-reset {
10% { width: 100% }
40% { width: 100%; right: 0px; }
45% { width: 100%; right: 0px; opacity: 1}
55% { width: 0%; right: 0px; opacity: 0;}
100% { width: 0%; opacity: 0;}
}
.progress {
height: 20px;
background-color: red;
-webkit-animation: progress-bar-complete-reset 1.5s linear;
-moz-animation: progress-bar-complete-reset 1.5s linear;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
}