Reputation: 21
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.
Upvotes: 2
Views: 1507
Reputation: 67778
use background-size: cover
for the element to which you applied the GIF as a background image.
Upvotes: 2