Here I have an animation that shakes a button every 4 seconds:
@keyframes wiggle {
  0% {
    transform: rotate(0);
  }
  3% {
    transform: rotate(10deg);
  }
  6% {
    transform: rotate(-10deg);
  }
  9% {
    transform: rotate(10deg);
  }
  12% {
    transform: rotate(-10deg);
  }
  15% {
    transform: rotate(0);
  }
}
Using an HTML number input I can change the duration of the animation, but as a side effect it makes the shaking animation slower. Is there a way I can preserve the speed of the shaking animation while increasing the interval between each shake? Maybe with two animations? Or a setInterval() ?
To clarify, I want the time between keyframes 0% and 15% to be the same while increasing the time between each animation.
Infinite loops
Thanks
