When we click on the following HTML <progress>
element, its value changes to 200.
But no animation works:
progress {
transition: all 1s ease;
-webkit-transition: all 1s ease;
animation: progress 1s ease;
}
progress::-webkit-progress-value {
transition: all 1s ease;
}
<progress value="0" onclick="this.value=200" max="1000"></progess>
How to animate a HTML <progress>
bar with CSS transition?
Linked but not duplicate: HTML5 progress bar animation, CSS3 Transition of HTML5 progress bar element
Also, the main answer of Animating Progress Element value (using jQuery and custom JS), doesn’t wok here, with just CSS transition/animation.
2
Answers
The problem was that no
background-color
was defined (!).Without (animation non-working):
With (animation working):
Try This: