0

This is for a hobby/browser sim game site. I am wanting to put an animated gif in the background of the page in place of a static background photo. The image is very simple, it's just a static image with a fog overlay playing on loop. I uploaded it via Imgur, which gave me an .mp4 link. I put it in the code and it displays properly for me on Safari when I look at it. But on Chrome/Firefox/Edge and everything else it won't show.

Here it is:

html {
background: 
URL(https://i.imgur.com/REDACTED.mp4) fixed center top,
background-size: cover; 
}

As I said it works on safari. But it doesn't work anywhere else. I know I'm not doing something right, but I'd really like for it to show the gif/mp4 file on other browsers too. Is there a fix for this?

This particular page that I am putting this into does not have an HTML box or a JS box. Only a stylesheet one. Again this is for a hobby site. So it comes with its constraints. Is this doable?

emma
  • 11
  • Does this answer your question? [Why I can set gif as background image url() in css, but can't set video mp4 as background url?](https://stackoverflow.com/questions/46376550/why-i-can-set-gif-as-background-image-url-in-css-but-cant-set-video-mp4-as-b) – Timothy Alexis Vass Jul 25 '21 at 20:52

1 Answers1

0

I figured out a solution. I just found a place to host the image as a .gif without making it smaller dimensions or lesser quality. Google Photos offers this option, so I hosted it through there.

emma
  • 11