Responsive GIF background for mobile

Viewed 1335

I have recently created a website that has a gif as a background image. The gif covers the entire screen on a computer, but when I use a mobile device and go onto my website, the gif is only present on the top fraction of the screen, leaving the rest of the space white. I've tried some solutions like putting in <meta name="viewport" content="width=device-width, initial-scale=1"> and background-size: cover; but that only made my text adjust, and not my gif background. Sorry if this question is stupid, but I appreciate any answers.

1 Answers

use background-size: cover for the element to which you applied the GIF as a background image.

Related