I'm trying to teach my little sister how to program, so we both made this together.
However for some reason, the background image won't cover the whole screen (when I use background-size:cover;
on iPhone 4 and 5 devices, it seems like other browsers, desktops, and smartphone sizes are fine.
Why is this?
function changeBackground(){
var photo_num = Math.floor((Math.random() * 40) + 1);
var photo_str ="assets/img/"+photo_num+".jpg";
document.getElementById("background_image").style.background = "linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.5)), url("+photo_str+") no-repeat center center fixed";
document.getElementById("background_image").style.backgroundSize ="cover";
changeQuote();
}
This is the function that changes the Photo and Text.