JSFiddle - React, Tailwind, and code Playground
by alexchetv
HTML
<body>
<div class="q-progress indeterminate negative">
<div class="q-progress-track" style="width: 100%;"> </div>
<div class="q-progress-model" style="width: 0%;"> </div>
</div>
</body>
CSS
.q-progress.indeterminate {
margin-top: -2px;
}
.q-progress {
position: relative;
height: 2px;
display: block;
width: 100%;
background-clip: padding-box;
overflow: hidden;
}
.q-progress-track,
.q-progress-buffer {
transition: width 0.3s linear;
position: absolute;
bottom: 0;
}
.q-progress-track {
left: 0;
top: 0;
}
.q-progress.negative .q-progress-model {
background-color: #db2828;
}
.q-progress.indeterminate .q-progress-model {
background: #027be3;
}
.q-progress.indeterminate .q-progress-model:before {
animation: q-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
.q-progress.indeterminate .q-progress-model:after {
animation: q-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
animation-delay: 1.15s;
}
.q-progress.indeterminate .q-progress-model:before, .q-progress.indeterminate .q-progress-model:after {
content: '';
position: absolute;
background: inherit;
top: 0;
left: 0;
bottom: 0;
will-change: left, right;
}
@keyframes q-progress-indeterminate {
0% {
left: -35%;
right: 100%; }
60% {
left: 100%;
right: -90%; }
100% {
left: 100%;
right: -90%; }
}
@keyframes q-progress-indeterminate-short {
0% {
left: -200%;
right: 100%; }
60% {
left: 107%;
right: -8%; }
100% {
left: 107%;
right: -8%; }
}