I have a background image that is ~300kb in size.
For some reason it will not load on my webpage even after several minutes.
This is the code where I am using the background image. It is in the same level as my webpage.
Am I doing something wrong here? Or is the image too large..?
Thanks.
body {
background-color: #D2C7AC;
background-image:url('background.jpg');
background-size: cover;
background-repeat: no-repeat;
}
I think the problem is solved. Thanks for the help 🙂
The image url should be in quotes.
You can check the network tab in the developer tools to make sure that the image is being found correctly as well (make sure it doesn’t return a 404).