I have been looking at different answers on how to check if a background image has loaded, however, majority of them are for if the image is set in the html code.
I have my image as a background url in a css file:
.container{
background-image: url(/images/rickandmorty.jpg) !important;
background-repeat: no-repeat;
background-size: cover;
}
At the moment, the text is loading before the picture. Any way around it using javascript?
Thanks