Home > Software design >  how to stop tailwindcss animation after a set time
how to stop tailwindcss animation after a set time

Time:01-02

I was wondering if there is a way to stop an animation in tailwindcss after a set time

stop bouncing after 10 seconds

I have tried everything but I cannot find a way

<div >
  <button >Hello</button>
</div>

I have tried the duration-75 but the animation wont stop

CodePudding user response:

There's no built-in way to do this. You can create your own class to override the iterations.

.temporary-bounce {
  -webkit-animation-iteration-count: 10;
  animation-iteration-count: 10;
}

For reference, the CSS for bounce is here.

https://tailwindcss.com/docs/animation#class-reference

  • Related