feni000 feni000 - 5 months ago 40
CSS Question

CSS transition on data-percentage attribute change

I have found a code that makes a Circular progress bar, and changed it a bit to grow on click from 1 to other number. Later on I wanted to add transition but it doesn't seem to work, the progress bar changes without transition

-moz-transition: all 1s ease-in-out;
-webkit-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;


Someone have an idea how to make transition work?


As @user1850903 wrote - transition doesn't work in that way.

You can use setInterval() to get the effect you want: