Я новичок в анимации. Я выбрал некоторый код с демонстрацией, которая работала в 5 браузерах, в которых я тестирую. Я на Windows 10 и имею последние версии 5 браузеров, в которых я тестирую (Chrome, FF, edge IE и Opera. CSS следует.
.progress-bar {
margin-bottom: 1rem;
background-color: tomato;
border-radius: 1.25em;
width: 300px;
height: 16px;
display: inline-block;
}
.progress-value {
background-color: MEDIUMBLUE;
transition: 0.3s all linear;
border-radius: 1.25em;
height: 16px;
display: inline-block;
animation: progress 3s ease-in-out forwards;
-webkit-animation: progress 3s ease-in-out forwards;
}
.progress-value.green {
background-color: MEDIUMSEAGREEN;
animation: progress-3 3s ease-in-out forwards;
-webkit-animation: progress-3 3s ease-in-out forwards;
}
.progress-value.red {
background-color: TOMATO;
animation: progress-2 3s ease-in-out forwards;
-webkit-animation: progress-2 3s ease-in-out forwards;
}
/* animation */
@keyframes progress {
from {
width: 0;
}
to {
width: 55%;
}
}
@-webkit-keyframes progress {
from {
width: 0;
}
to {
width: 55%;
}
}
@keyframes progress-2 {
from {
width: 0;
}
to {
width: 70%;
}
}
@-webkit-keyframes progress-2 {
from {
width: 0;
}
to {
width: 70%;
}
}
@keyframes progress-3 {
from {
width: 0;
}
to {
width: 90%;
}
}
@-webkit-keyframes progress-3 {
from {
width: 0;
}
to {
width: 90%;
}
}
<DIV ID='dvLoading' STYLE='POSITION:relative;TOP:-300px;LEFT:30%;'>
<DIV class='progress-bar'>
<DIV class='progress-value' style='WIDTH:70%;'></DIV>
</DIV>
</DIV>
Бар выглядит так, как я надеялся. Но нет анимации ни в одном из 5 браузеров.