Yes, this is possible because WebKit uses the Shadow DOM to materialize the counter element instead of using the default system (so that you can configure the metric progress bar). You can define this as hidden content inside a counter element:
<div pseudo="-webkit-meter-inner-element"> <div pseudo="-webkit-meter-bar"> <div pseudo="-webkit-meter-optimum-value" style="width: 46%;"></div> </div> </div>
When you change the value of your counter, WebKit will change the width of the last div. So:
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { transition: 1s width; }
You can animate your counter.
leops source share