How can I delete an animation when it ends?

I put a lottie animation on my wordpress web, it works perfectly, but it keeps there once it was executed.

I want once it is played, it delete itself as soon as it ends. However remain the square or the place that it was occupying