https://codepen.io/spartanatreyu/pen/YzbPjwg?editors=1100
But if you want each step's duration to be parameterizable then you'll need to reach for js, I'd recommend the Animation API.