I’ve been playing around with html, css and JS lately. Right now I have a div that has a background gif. This is what I did:
<div class = "mydiv" style = "background-image: url(play.gif);"></div>
So first, it fills the entire space by repeating the image over and over side by side. I was wondering if there was a way to only have the image show up once and at the center of the div.
Another question I have is if it is possible to “pause” the gif at the beginning and only play it when the user hovers over the div and when they hover-off the gif goes back and stays at the beginning. If this is not possible for gifs, is it possible for videos (.mp4 .webm etc.)