-1

I am searching for a way to display/play a gif inside of a button. The button should have a gif inside it, that starts playing on hover.

WakanaYuki
  • 23
  • 1
  • 1
    Does this answer your question? [Can you control GIF animation with Javascript?](https://stackoverflow.com/questions/2385203/can-you-control-gif-animation-with-javascript) – zero298 Jun 01 '20 at 20:21

1 Answers1

0

Well, you need to use CSS

<style>
.button {
background: url('gifname.gif');
border: none;
background-repeat: no-repeat;
object-fit: cover;
}
</style>
<button class="button">

I hope that solves your problem